home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_gen / inter52b.zip / INTERRUP.E < prev    next >
Text File  |  1996-10-20  |  348KB  |  9,001 lines

  1. Interrupt List, part 5 of 15
  2. Copyright (c) 1989,1990,1991,1992,1993,1994,1995,1996 Ralf Brown
  3. --------D-213F-------------------------------
  4. INT 21 - DOS 2+ - "READ" - READ FROM FILE OR DEVICE
  5.     AH = 3Fh
  6.     BX = file handle
  7.     CX = number of bytes to read
  8.     DS:DX -> buffer for data
  9. Return: CF clear if successful
  10.         AX = number of bytes actually read (0 if at EOF before call)
  11.     CF set on error
  12.         AX = error code (05h,06h) (see #1020 at AH=59h/BX=0000h)
  13. Notes:    data is read beginning at current file position, and the file position
  14.       is updated after a successful read
  15.     the returned AX may be smaller than the request in CX if a partial
  16.       read occurred
  17.     if reading from CON, read stops at first CR
  18.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  19. BUG:    Novell NETX.EXE v3.26 and 3.31 do not set CF if the read fails due to
  20.       a record lock (see AH=5Ch), though it does return AX=0005h; this
  21.       has been documented by Novell
  22. SeeAlso: AH=27h,AH=40h,AH=93h,INT 2F/AX=1108h,INT 2F/AX=1229h
  23. --------G-213F-------------------------------
  24. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - READ STATUS BLOCK
  25.     AH = 3Fh
  26.     BX = handle for character device "TDHDEBUG"
  27.     CX = number of bytes to read
  28.     DS:DX -> buffer for status block (see #0752)
  29. Return: CF clear if successful
  30.         AX = number of bytes actually read
  31.     CF set on error
  32.         AX = error code (05h,06h) (see #1020 at AH=59h/BX=0000h)
  33. SeeAlso: AH=40h"Turbo Debug"
  34.  
  35. (Table 0751)
  36. Values for status of Turbo Debugger command:
  37.  00h    successful
  38.  01h    invalid handle
  39.  02h    no more breakpoints available
  40.  03h    hardware does not support specified breakpoint type
  41.  04h    previous command prevents execution
  42.  05h    debugger hardware not found
  43.  06h    hardware failure
  44.  07h    invalid command
  45.  08h    driver not initialized yet
  46.  FEh    recursive entry (hardware breakpoint inside hw bp handler)
  47.  
  48. Format of Turbo Debugger status block:
  49. Offset    Size    Description    (Table 0752)
  50.  00h    BYTE    status of command (see #0751)
  51. ---status for command 01h---
  52.  01h    WORD    device driver interface version number (currently 1)
  53.  03h    WORD    device driver software version
  54.  05h    BYTE    maximum simultaneous hardware breakpoints
  55.  06h    BYTE    configuration bits (see #0753)
  56.  07h    BYTE    supported breakpoint types (see #0754)
  57.  08h    WORD    supported addressing match modes (see #0755)
  58.  0Ah    WORD    supported data matches (see #0756)
  59.  0Ch    BYTE    maximum data match length (01h, 02h, or 04h)
  60.  0Dh    WORD    size of onboard memory (in KB)
  61.  0Fh    WORD    maximum number of trace-back events
  62.  11h    WORD    hardware breakpoint enable byte address segment (0000h if not
  63.           supported)
  64. ---status for command 04h---
  65.  01h    BYTE    handle to use when referring to the just-set breakpoint
  66.  
  67. Bitfields for Turbo Debugger configuration bits:
  68. Bit(s)    Description    (Table 0753)
  69.  0    CPU and DMA accesses are distinct
  70.  1    can detect DMA transfers
  71.  2    supports data mask
  72.  3    hardware pass counter on breakpoints
  73.  4    can match on data as well as addresses
  74.  
  75. Bitfields for Turbo Debugger supported breakpoint types:
  76. Bit(s)    Description    (Table 0754)
  77.  0    memory read
  78.  1    memory write
  79.  2    memory read/write
  80.  3    I/O read
  81.  4    I/O write
  82.  5    I/O read/write
  83.  6    instruction fetch
  84.  
  85. Bitfields for Turbo Debugger supported addressing match modes:
  86. Bit(s)    Description    (Table 0755)
  87.  0    any address
  88.  1    equal to test value
  89.  2    not equal
  90.  3    above test value
  91.  4    below test value
  92.  5    below or equal
  93.  6    above or equal
  94.  7    within range
  95.  8    outside range
  96.  
  97. Bitfields for Turbo Debugger supported data matches:
  98. Bit(s)    Description    (Table 0756)
  99.  0    any data
  100.  1    equal to test value
  101.  2    not equal
  102.  3    above test value
  103.  4    below test value
  104.  5    below or equal
  105.  6    above or equal
  106.  7    within range
  107.  8    outside range
  108. --------N-213F-------------------------------
  109. INT 21 - PC/TCP IPCUST.SYS - READ CONFIGURATION DATA
  110.     AH = 3Fh
  111.     BX = handle for character device "$IPCUST"
  112.     CX = number of bytes to read
  113.     DS:DX -> buffer for configuration data (see #0757)
  114. Return: CF clear if successful
  115.         AX = number of bytes actually read
  116.     CF set on error
  117.         AX = error code (05h,06h) (see #1020 at AH=59h/BX=0000h)
  118. Notes:    if less than the entire data is read or written, the next read/write
  119.       continues where the previous one ended; IOCTL calls AX=4402h and
  120.       AX=4403h both reset the location at which the next operation starts
  121.       to zero
  122.     the data pointer is also reset to zero if the previous read or write
  123.       reached or exceeded the end of the data, when the current function
  124.       is read and the previous was write, or vice versa
  125.     v2.1+ uses a new configuration method, but allows the installation
  126.       of IPCUST.SYS for backward compatibility with other software which
  127.       must read the PC/TCP configuration
  128. SeeAlso: AH=40h"IPCUST",AX=4402h"IPCUST",AX=4402h"FTPSOFT"
  129.  
  130. Format of PC/TCP configuration data:
  131. Offset    Size    Description    (Table 0757)
  132.  00h 12 BYTEs    IPCUST.SYS device driver header (see #0987)
  133.  12h    BYTE    ???
  134.  13h    BYTE    ???
  135.  14h    WORD    ???
  136.  16h    BYTE    bit flags
  137.         bit 0: send BS rather than DEL for BackSpace key
  138.         bit 1: wrap long lines
  139.  17h    BYTE    ???
  140.  18h 64 BYTEs    ASCIZ hostname
  141.  58h 64 BYTEs    ASCIZ domain name
  142.         (fully qualified domain name is hostname.domain-name)
  143.  98h 16 BYTEs    ASCIZ username
  144.  A8h 64 BYTEs    ASCIZ full name
  145.  E8h 64 BYTEs    ASCIZ office address
  146. 128h 32 BYTEs    ASCIZ phone number
  147. 148h    WORD    offset from GMT in minutes
  148. 14Ah  4 BYTEs    ASCIZ timezone name
  149. 14Eh    WORD    number of time servers
  150. 150h  ? DWORDs    (big-endian) IP addresses for time servers
  151.     ???
  152. 164h    WORD    number of old-style name servers
  153. 166h  3 DWORDs    (big-endian) IP addresses for name servers
  154. 172h    WORD    number of domain name servers
  155. 174h  3 DWORDs    (big-endian) IP addresses for domain name servers
  156. 180h    DWORD    (big-endian) IP address of default gateway
  157. 184h    DWORD    (big-endian) IP address of log server
  158. 188h    DWORD    (big-endian) IP address of cookie server
  159. 18Ch    DWORD    (big-endian) IP address of lpr server
  160. 190h    DWORD    (big-endian) IP address of imagen print server
  161. 194h 54 BYTEs    ???
  162. 1E8h    WORD    TCP default window size in bytes
  163. 1EAh    WORD    TCP low window size
  164. 1ECh 64 BYTEs    ASCIZ host tabel filename
  165. 22Ch  2 BYTEs    ???
  166. 22Eh 80 BYTEs    ASCIZ mail relay host name
  167. 27Eh    BYTE    ???
  168. 27Fh    BYTE    ??? bit flags
  169. 280h 44 BYTEs    ???
  170. 2ACh    WORD    ???
  171. 2AEh 202 BYTEs    ???
  172. --------N-213F-------------------------------
  173. INT 21 - WORKGRP.SYS - GET ENTRY POINT
  174.     AH = 3Fh
  175.     BX = file handle for device "NET$HLP$"
  176.     CX = 0008h
  177.     DS:DX -> buffer for entry point record (see #0827)
  178. Return: CF clear if successful
  179.         AX = number of bytes actually read (0 if at EOF before call)
  180.     CF set on error
  181.         AX = error code (05h,06h) (see #1020 at AH=59h/BX=0000h)
  182. Program: WORKGRP.SYS is the portion of Microsoft's Workgroup Connection which
  183.       permits communication with PCs running Windows for Workgroups or
  184.       LAN Manager
  185. SeeAlso: AX=4402h"WORKGRP.SYS",INT 2F/AX=9400h
  186. --------N-213F-------------------------------
  187. INT 21 - BW-TCP - GET DRIVER INFO
  188.     AH = 3Fh
  189.     BX = file handle for device "ETHDEV27"
  190.     CX = 002Bh
  191.     DS:DX -> buffer for driver info (see #0758)
  192. Return: CF clear if successful
  193.         AX = number of bytes actually read (0 if at EOF before call)
  194.     CF set on error
  195.         AX = error code (05h,06h) (see #1020 at AH=59h/BX=0000h)
  196. Program: BW-TCP is a TCP/IP protocol stack by Beame & Whiteside Software
  197. Notes:    the B&W socket library performs an INT 21/AX=4401h with DX=0060h before
  198.       making this call to retrieve the driver information; one should also
  199.       call the private API interrupt with AH=15h
  200.     the installation check for the TCP/IP stack is to test for the
  201.       existence of the character device UDP-IP10
  202. SeeAlso: INT 14/AH=56h,INT 62/AH=00h"ETHDEV",INT 63/AH=03h,INT 64/AH=01h
  203. Index:    installation check;BW-TCP hardware driver
  204. Index:    installation check;BW-TCP TCPIP.SYS
  205.  
  206. Format of BW-TCP driver info:
  207. Offset    Size    Description    (Table 0758)
  208.  00h    WORD    I/O base address
  209.  02h    BYTE    shared memory page (01h = segment 0100h, etc.)
  210.  03h    BYTE    interrupt vector for private API
  211.  04h    BYTE    IRQ used by board
  212.  05h    WORD    size of data buffer
  213.  07h    WORD    maximum transfer window
  214.  09h    WORD    time zone
  215.  0Bh    BYTE    address type (01h user, 04h RARP, 05h BOOTP)
  216.  0Ch    DWORD    internet address
  217.  10h    WORD    "value" ???
  218.  12h    BYTE    subnet mask
  219.  13h    WORD    "ether_pointer" ???
  220.  15h    WORD    offset in device driver of log server records (see #0759)
  221.  17h    WORD    offset in device driver of name server records (see #0759)
  222.  19h    WORD    offset in device driver of print server records (see #0759)
  223.  1Bh    WORD    offset in device driver of time server records (see #0759)
  224.  1Dh    WORD    offset in device driver of gateway records (see #0759)
  225.  1Fh    WORD    segment address of device driver
  226.  21h    BYTE    transfer size
  227.  22h  9 BYTEs    network adapter board name
  228. ---11/21/91+ ---
  229.  23h    BYTE    ETHDEV version (major in high nybble, minor in low nybble)
  230.  24h    BYTE    ETHDEV revision
  231.  25h    BYTE    TCPIP version (major in high nybble, minor in low nybble)
  232.  26h    BYTE    TCPIP revision
  233.  27h    BYTE    BWRPC version (major in high nybble, minor in low nybble)
  234.  28h    BYTE    BWRPC revision
  235.  29h    BYTE    BWNFS version (major in high nybble, minor in low nybble)
  236.  2Ah    BYTE    BWNFS revision
  237.  2Bh    BYTE    Telnet version (major in high nybble, minor in low nybble)
  238.  2Ch    BYTE    Telnet revision
  239.  2Dh    BYTE    NETBIOS version (major in high nybble, minor in low nybble)
  240.  2Eh    BYTE    NETBIOS revision
  241. Note:    for each driver, if version=0, the driver is not installed or does
  242.       not support the version check
  243.  
  244. Format of BW-TCP server records:
  245. Offset    Size    Description    (Table 0759)
  246.  00h    BYTE    number of server records following
  247.  01h  N DWORDs    internet addresses of servers
  248. --------y-213F-------------------------------
  249. INT 21 - Trusted Access - NB.SYS - GET STATE
  250.     AH = 3Fh
  251.     BX = file handle for device "$$NB$$NB"
  252.     CX = 0002h (size of state)
  253.     DS:DX -> buffer for state record (see #0760)
  254. Return: CF clear if successful
  255.         AX = number of bytes actually read (0 if at EOF before call)
  256.     CF set on error
  257.         AX = error code (05h,06h) (see #1020 at AH=59h/BX=0000h)
  258. Program: Trusted Access is a security and access-control package by Lassen
  259.       Software, Inc.; NB.SYS is a device driver to prevent the user from
  260.       terminating CONFIG.SYS or AUTOEXEC.BAT with Ctrl-Break
  261. SeeAlso: AH=40h"NB.SYS",AX=4101h
  262.  
  263. Format of Trusted Access state record:
  264. Offset    Size    Description    (Table 0760)
  265.  00h    BYTE    00h off, 01h on
  266.  01h    BYTE    keys being disabled
  267.         bit 0: Ctrl-Break
  268.         bit 1: SysReq
  269.         bit 2: Ctrl and Alt
  270.         bit 3: Ctrl-Alt-Del
  271.         bit 7: all keys (overrides other bits)
  272. ----------213F-------------------------------
  273. INT 21 U - IFSHLP.SYS - GET ENTRY POINT
  274.     AH = 3Fh
  275.     BX = file handle for device "IFS$HLP$"
  276.     CX = 0008h (size of buffer in bytes)
  277.     DS:DX -> buffer for entry point record (see #0761)
  278. Return: CF clear if successful
  279.         AX = number of bytes actually read (0 if at EOF before call)
  280.     CF set on error
  281.         AX = error code (05h,06h) (see #1020 at AH=59h/BX=0000h)
  282. Program: IFSHLP.SYS is a support driver for Microsoft Windows for Workgroups
  283. SeeAlso: AX=4402h"IFSHLP"
  284.  
  285. Format of IFSHLP.SYS entry point record:
  286. Offset    Size    Description    (Table 0761)
  287.  00h  4 BYTEs    (call) signature 70h E9h 34h 37h
  288.         signature must be 34h 37h 70h EFh if called via IOCTL
  289.  04h    DWORD    (ret) pointer to FAR call entry point (see #0762)
  290.  
  291. (Table 0762)
  292. Call IFSHLP.SYS entry point with:
  293.     STACK:    WORD    function number (00h-0Ch)
  294.             00h ???
  295.             01h set ??? intercept
  296.             02h remove ??? intercept
  297.             03h ??? LPT2
  298.             04h ??? LPT1
  299.             05h ??? and remove ??? intercept
  300.             06h set ??? flag
  301.             07h clear ??? flag
  302.             08h get ??? flag word
  303.             09h ???
  304.             0Ah ???
  305.             0Bh ???
  306.             0Ch get ???
  307. ---if function 00h---
  308. Return: AX = ??? (0024h seen)
  309.     DX = resident code segment
  310. ---if function 01h---
  311.     STACK:    DWORD    new intercept address
  312. Return: AX = status
  313.         0000h successful
  314.         0001h failed (already set)
  315.         DX = 0000h
  316. ---if function 02h---
  317. Return: AX = status
  318.         0000h successful
  319.         0001h failed (not set)
  320.     DX = 0000h
  321. ---if function 03h,04h---
  322.     STACK:    WORD    ???
  323. Return: AX = 0000h
  324.     DX = 0000h
  325. ---if function 05h---
  326.     ???
  327. ---if function 06h---
  328. Return: AX = 0001h and DX = 0000h if already set
  329.     AX,DX unchanged if successful
  330. ---if function 07h---
  331. Return: AX = 0001h and DX = 0000h if not set
  332.     AX,DX unchanged if successful
  333. ---if function 08h---
  334. Return: DX = 0000h
  335.     AX = flags (bit 0 set/cleared by functions 06h and 07h)
  336. ---if function 09h---
  337. Return: AX = status
  338.         0000h successful
  339.         0001h failed (already called)
  340. ---if function 0Ah---
  341.     STACK:    WORD    ???
  342.     ???
  343. ---if function 0Bh---
  344. Return: AX = status
  345.         0000h successful
  346.         0001h failed (not set)
  347. ---if function 0Ch---
  348. Return: AX = 0000h
  349.     ES:BX -> ??? data
  350. ---if function > 0Ch---
  351. Return: AX = 0001h
  352.     DX = 0000h
  353. --------v-213F--BXFEB0-----------------------
  354. INT 21 - VIRUS - "KYZ/LieWait" - INSTALLATION CHECK
  355.     AH = 3Fh
  356.     BX = FEB0h
  357. Return: BX = 1212h if resident
  358. SeeAlso: AX=3032h"VIRUS",AX=4BF1h"VIRUS"
  359. --------D-2140-------------------------------
  360. INT 21 - DOS 2+ - "WRITE" - WRITE TO FILE OR DEVICE
  361.     AH = 40h
  362.     BX = file handle
  363.     CX = number of bytes to write
  364.     DS:DX -> data to write
  365. Return: CF clear if successful
  366.         AX = number of bytes actually written
  367.     CF set on error
  368.         AX = error code (05h,06h) (see #1020 at AH=59h/BX=0000h)
  369. Notes:    if CX is zero, no data is written, and the file is truncated or
  370.       extended to the current position
  371.     data is written beginning at the current file position, and the file
  372.       position is updated after a successful write
  373.     the usual cause for AX < CX on return is a full disk
  374. BUG:    a write of zero bytes will appear to succeed when it actually failed
  375.       if the write is extending the file and there is not enough disk
  376.       space for the expanded file (DOS 5.0-6.0); one should therefore check
  377.       whether the file was in fact extended by seeking to 0 bytes from
  378.       the end of the file (INT 21/AX=4202h/CX=0/DX=0)
  379.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  380. SeeAlso: AH=28h,AH=3Fh,AH=93h,INT 2F/AX=1109h
  381. --------G-2140-------------------------------
  382. INT 21 - Turbo Debug HARDWARE BREAKPOINTS - SEND CMD TO HARDWARE BRKPNT DRIVER
  383.     AH = 40h
  384.     BX = handle for character device "TDHDEBUG"
  385.     CX = number of bytes to write
  386.     DS:DX -> hardware breakpoint command (see #0763)
  387. Return: CF clear if successful
  388.         AX = number of bytes actually written
  389.     CF set on error
  390.         AX = error code (05h,06h) (see #1020 at AH=59h/BX=0000h)
  391. Note:    results are retrieved by reading from the device
  392. SeeAlso: AH=3Fh"Turbo Debug"
  393.  
  394. Format of Turbo Debugger hardware breakpoint commands:
  395. Offset    Size    Description    (Table 0763)
  396.  00h    BYTE    command code
  397.         00h install interrupt vectors
  398.         01h get hardware capabilities
  399.         02h enable hardware breakpoints
  400.         03h disable hardware breakpoints
  401.         04h set hardware breakpoint
  402.         05h clear hardware breakpoint
  403.         06h set I/O base address and reset hardware
  404.         07h restore interrupt vectors
  405. ---command code 00h---
  406.  01h    DWORD    pointer to Turbo Debugger entry point to be jumped to on
  407.           hardware breakpoint; call with CPU state the same as on
  408.           the breakpoint except for pushing AX and placing an entry
  409.           code (FFh if breakout button or breakpoint handle) in AH
  410. ---command code 04h---
  411.  01h    BYTE    breakpoint type
  412.         00h memory read
  413.         01h memory write
  414.         02h memory read/write
  415.         03h I/O read
  416.         04h I/O write
  417.         05h I/O read/write
  418.         06h instruction fetch
  419.  02h    BYTE    address matching mode (see #0764)
  420.  03h    DWORD    32-bit linear low address
  421.  07h    DWORD    32-bit linear high address
  422.  0Bh    WORD    pass count
  423.  0Dh    BYTE    data size (01h, 02h, or 04h)
  424.  0Eh    BYTE    source of matched bus cycle (01h CPU, 02h DMA, 03h either)
  425.  0Fh    BYTE    data-matching mode (see #0764)
  426.  10h    DWORD    low data value
  427.  14h    DWORD    high data value
  428.  18h    DWORD    data mask specifying which bits of the data are tested
  429. ---command code 05h---
  430.  01h    BYTE    handle of breakpoint to clear (breakpoint returned from command
  431.           04h)
  432. ---command code 06h---
  433.  01h    WORD    base address of hardware debugger board
  434.  
  435. (Table 0764)
  436. Values for Turbo Debugger address/data matching mode:
  437.  00h    match any
  438.  01h    equal to test value
  439.  02h    different from test value
  440.  03h    above test value
  441.  04h    below test value
  442.  05h    below or equal to test value
  443.  06h    above or equal to test value
  444.  07h    within inclusive range
  445.  08h    outside specified range
  446. --------N-2140-------------------------------
  447. INT 21 - PC/TCP IPCUST.SYS - WRITE CONFIGURATION DATA
  448.     AH = 40h
  449.     BX = handle for character device "$IPCUST"
  450.     CX = number of bytes to write
  451.     DS:DX -> buffer for configuration data (AH=3Fh"IPCUST")
  452. Return: CF clear if successful
  453.         AX = number of bytes actually written
  454.     CF set on error
  455.         AX = error code (05h,06h) (see #1020 at AH=59h/BX=0000h)
  456. Notes:    if less than the entire data is read or written, the next read/write
  457.       continues where the previous one ended; IOCTL calls AX=4402h and
  458.       AX=4403h both reset the location at which the next operation starts
  459.       to zero
  460.     the data pointer is also reset to zero if the previous read or write
  461.       reached or exceeded the end of the data, when the current function
  462.       is read and the previous was write, or vice versa
  463.     v2.1+ uses a new configuration method, but allows the installation
  464.       of IPCUST.SYS for backward compatibility with other software which
  465.       must read the PC/TCP configuration
  466. SeeAlso: AH=3Fh"IPCUST",AX=4402h"IPCUST"
  467. --------y-2140-------------------------------
  468. INT 21 U - Trusted Access - NB.SYS - SET STATE
  469.     AH = 40h
  470.     BX = handle for character device "$$NB$$NB"
  471.     DS:DX -> state record (see #0760)
  472.     CX ignored
  473. Return: CF clear if successful
  474.         AX = number of bytes actually written
  475.     CF set on error
  476.         AX = error code (05h,06h) (see #1020 at AH=59h/BX=0000h)
  477. Program: Trusted Access is a security and access-control package by Lassen
  478.       Software, Inc.; NB.SYS is a device driver to prevent the user from
  479.       terminating CONFIG.SYS or AUTOEXEC.BAT with Ctrl-Break
  480. SeeAlso: AH=3Fh"NB.SYS"
  481. --------j-214000BX0002-----------------------
  482. INT 21 - FARTBELL.EXE - INSTALLATION CHECK
  483.     AX = 4000h
  484.     BX = 0002h
  485.     CX = 0000h
  486.     DS:DX = 0000h:0000h
  487. Return: CF clear if installed
  488.         AX = CS of resident code
  489. Program: FARTBELL is a joke program by Guenther Thiele which makes various
  490.       noises when programs output a bell
  491. SeeAlso: AX=4001h
  492. --------j-214001BX0002-----------------------
  493. INT 21 - FARTBELL.EXE - FORCE NOISE
  494.     AX = 4001h
  495.     BX = 0002h
  496.     CX = 0000h
  497.     DS:DX = 0000h:0000h
  498. Program: FARTBELL is a joke program by Guenther Thiele which makes various
  499.       noises when programs output a bell
  500. SeeAlso: AX=4000h
  501. --------D-2141-------------------------------
  502. INT 21 - DOS 2+ - "UNLINK" - DELETE FILE
  503.     AH = 41h
  504.     DS:DX -> ASCIZ filename (no wildcards, but see notes)
  505.     CL = attribute mask for deletion (server call only, see notes)
  506. Return: CF clear if successful
  507.         AX destroyed (DOS 3.3) AL seems to be drive of deleted file
  508.     CF set on error
  509.         AX = error code (02h,03h,05h) (see #1020 at AH=59h/BX=0000h)
  510. Notes:    (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  511.       the filespec must be canonical (as returned by AH=60h), and only
  512.       files matching the attribute mask in CL are deleted
  513.     DR DOS 5.0-6.0 returns error code 03h if invoked via AX=5D00h; DR DOS
  514.       3.41 crashes if called via AX=5D00h with wildcards
  515.     DOS does not erase the file's data; it merely becomes inaccessible
  516.       because the FAT chain for the file is cleared
  517.     deleting a file which is currently open may lead to filesystem
  518.       corruption.  Unless SHARE is loaded, DOS does not close the handles
  519.       referencing the deleted file, thus allowing writes to a nonexistant
  520.       file.
  521.     under DR DOS and DR Multiuser DOS, this function will fail if the file
  522.       is currently open
  523.     under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
  524. BUG:    DR DOS 3.41 crashes if called via AX=5D00h
  525. SeeAlso: AH=13h,AX=4301h,AX=4380h,AX=5D00h,AH=60h,AH=71h,AX=F244h
  526. SeeAlso: INT 2F/AX=1113h
  527. --------y-214101DXFFFE-----------------------
  528. INT 21 - SoftLogic Data Guardian - ???
  529.     AX = 4101h
  530.     DX = FFFEh
  531. Return: AX = 0000h if installed
  532. Note:    resident code sets several internal variables on this call
  533. SeeAlso: AH=3Fh"NB.SYS",INT 16/AX=FFA3h/BX=0000h
  534. --------D-2142-------------------------------
  535. INT 21 - DOS 2+ - "LSEEK" - SET CURRENT FILE POSITION
  536.     AH = 42h
  537.     AL = origin of move
  538.         00h start of file
  539.         01h current file position
  540.         02h end of file
  541.     BX = file handle
  542.     CX:DX = offset from origin of new file position
  543. Return: CF clear if successful
  544.         DX:AX = new file position in bytes from start of file
  545.     CF set on error
  546.         AX = error code (01h,06h) (see #1020 at AH=59h/BX=0000h)
  547. Notes:    for origins 01h and 02h, the pointer may be positioned before the
  548.       start of the file; no error is returned in that case, but subsequent
  549.       attempts at I/O will produce errors
  550.     if the new position is beyond the current end of file, the file will
  551.       be extended by the next write (see AH=40h)
  552. BUG:    using this method to grow a file from zero bytes to a very large size
  553.       can corrupt the FAT in some versions of DOS; the file should first
  554.       be grown from zero to one byte and then to the desired large size
  555. SeeAlso: AH=24h,INT 2F/AX=1228h
  556. --------v-214203-----------------------------
  557. INT 21 - VIRUS - "Shake" - INSTALLATION CHECK
  558.     AX = 4203h
  559. Return: AX = 1234h if resident
  560. SeeAlso: AX=3DFFh,AX=4243h
  561. --------v-214243-----------------------------
  562. INT 21 - VIRUS - "Invader" - INSTALLATION CHECK
  563.     AX = 4243h
  564. Return: AX = 5678h if resident
  565. SeeAlso: AX=4203h,AX=44A0h,AX=4B04h
  566. --------D-214300-----------------------------
  567. INT 21 - DOS 2+ - GET FILE ATTRIBUTES
  568.     AX = 4300h
  569.     DS:DX -> ASCIZ filename
  570. Return: CF clear if successful
  571.         CX = file attributes (see #0765)
  572.         AX = CX (DR DOS 5.0)
  573.     CF set on error
  574.         AX = error code (01h,02h,03h,05h) (see #1020 at AH=59h)
  575. Notes:    under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  576.     under DR DOS 3.41 and 5.0, attempts to change the subdirectory bit are
  577.       simply ignored without an error
  578. BUG:    Windows for Workgroups returns error code 05h (access denied) instead
  579.       of error code 02h (file not found) when attempting to get the
  580.       attributes of a nonexistent file.  This causes open() with O_CREAT
  581.       and fopen() with the "w" mode to fail in Borland C++.
  582. SeeAlso: AX=4301h,AX=4310h,AX=7143h,AH=B6h,INT 2F/AX=110Fh,INT 60/DI=0517h
  583. --------D-214301-----------------------------
  584. INT 21 - DOS 2+ - "CHMOD" - SET FILE ATTRIBUTES
  585.     AX = 4301h
  586.     CX = new file attributes (see #0765)
  587.     DS:DX -> ASCIZ filename
  588. Return: CF clear if successful
  589.         AX destroyed
  590.     CF set on error
  591.         AX = error code (01h,02h,03h,05h) (see #1020 at AH=59h)
  592. Notes:    will not change volume label or directory attribute bits, but will
  593.       change the other attribute bits of a directory (the directory
  594.       bit must be cleared to successfully change the other attributes of a
  595.       directory, but the directory will not be changed to a normal file as
  596.       a result)
  597.     MS-DOS 4.01 reportedly closes the file if it is currently open
  598.     for security reasons, the Novell NetWare execute-only bit can never
  599.       be cleared; the file must be deleted and recreated
  600.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  601.     DOS 5.0 SHARE will close the file if it is currently open in sharing-
  602.       compatibility mode, otherwise a sharing violation critical error is
  603.       generated if the file is currently open
  604.     DR DOS 3.41/5.0 will silently ignore attempts to change the 'directory'
  605.       attribute bit
  606. SeeAlso: AX=4300h,AX=4311h,AX=7143h,INT 2F/AX=110Eh
  607.  
  608. Bitfields for file attributes:
  609. Bit(s)    Description    (Table 0765)
  610.  7    shareable (Novell NetWare)
  611.  6    unused
  612.  5    archive
  613.  4    directory
  614.  3    volume label
  615.     execute-only (Novell NetWare)
  616.  2    system
  617.  1    hidden
  618.  0    read-only
  619. --------D-214302-----------------------------
  620. INT 21 - DOS 7 - GET COMPRESSED FILE SIZE
  621.     AX = 4302h
  622.     DS:DX -> ASCIZ pathname for file or directory
  623. Return: CF clear if successful
  624.         ??? = compressed size of file/directory in bytes
  625.     CF set on error
  626.         AX = error code
  627. Note:    on volumes which do not support compression, the returned size is the
  628.       actual file size rounded up to the next cluster boundary
  629. SeeAlso: AH=71h,AH=72h
  630. --------O-214302-----------------------------
  631. INT 21 - DR DOS 3.41+ internal - GET ACCESS RIGHTS
  632.     AX = 4302h
  633.     DS:DX -> ASCIZ pathname
  634. Return: CF clear if successful
  635.         CX = access rights (see #0766)
  636.         AX = CX (DR DOS 5.0)
  637.     CF set on error
  638.         AX = error code
  639. Desc:    Determine which operations the calling program may perform on a
  640.       specified file without being required to provide a password.
  641. Notes:    this protection scheme has been coordinated on all current Digital
  642.       Research/Novell operating systems (DR DOS 3.41+, DRMDOS 5.x, and
  643.       FlexOS 2+)
  644.     this function is documented in DR DOS 6.0 and corresponds to the
  645.       "Get/Set File Attributes" function, subfunction 2, documented in
  646.       Concurrent DOS.
  647.     only FlexOS actually uses the "execution" bits; DR DOS 3.41+ treats
  648.       them as "read" bits.
  649.     DR DOS 3.41-5.x only use bits 0-3.  Only DR DOS 6.0 using a
  650.       DRMDOS 5.x security system allowing for users and groups uses bits
  651.       4-11.
  652. SeeAlso: AX=4303h
  653.  
  654. Bitfields for DR DOS file access rights:
  655. Bit(s)    Description    (Table 0766)
  656.  0    owner delete requires password
  657.  1    owner execution requires password (FlexOS)
  658.  2    owner write requires password
  659.  3    owner read requires password
  660.  4    group delete requires password
  661.  5    group execution requires password (FlexOS)
  662.  6    group write requires password
  663.  7    group read requires password
  664.  8    world delete requires password
  665.  9    world execution requires password (FlexOS)
  666.  10    world write requires password
  667.  11    world read requires password
  668. --------O-214303-----------------------------
  669. INT 21 - DR DOS 3.41+ internal - SET ACCESS RIGHTS AND PASSWORD
  670.     AX = 4303h
  671.     CX = access rights
  672.          bits 11-0: access rights (see #0766)
  673.          bit 15: new password is to be set
  674.     DS:DX -> ASCIZ pathname
  675.     [DTA] = new password if CX bit 15 is set (blank-padded to 8 characters)
  676. Return: CF clear if successful
  677.     CF set on error
  678.         AX = error code
  679. Notes:    if the file is already protected, the old password must be added after
  680.       the pathname, separated by a ";"
  681.     this function is documented in DR DOS 6.0 and corresponds to the
  682.       "Get/Set File Attributes" function, subfunction 3, documented in
  683.       Concurrent DOS.
  684. SeeAlso: AH=0Fh,AH=17h,AX=4302h"DR DOS",AX=4305h,AX=4454h
  685. --------O-214304-----------------------------
  686. INT 21 U - DR DOS 5.0-6.0 internal - GET ENCRYPTED PASSWORD
  687.     AX = 4304h
  688.     DS:DX -> ASCIZ filename
  689.     ???
  690. Return: CF clear if successful
  691.         CX = AX = 0000h if no password assigned to file
  692.     CF set on error
  693.         AX = error code (see #1020 at AH=59h/BX=0000h)
  694. Note:    this function is only supported by DR DOS 5.0 and 6.0 and DRMDOS 5.1
  695. SeeAlso: AX=4303h,AX=4305h
  696. --------O-214305-----------------------------
  697. INT 21 U - DR DOS 5.0-6.0 internal - SET EXTENDED FILE ATTRIBUTES
  698.     AX = 4305h
  699.     DS:DX -> ASCIZ filename
  700.     ???
  701. Return: CF clear if successful
  702.     CF set on error
  703.         AX = error code (see #1020 at AH=59h/BX=0000h)
  704. Desc:    this function allows the extended attributes, and optionally the
  705.       encrypted password, of a file to be set.
  706. Note:    this function is only supported by DR DOS 5.0 and 6.0 and DRMDOS 5.1
  707. SeeAlso: AX=4304h,AX=4311h
  708. --------O-214306-----------------------------
  709. INT 21 - DR DOS 6.0 - GET FILE OWNER
  710.     AX = 4306h
  711.     DS:DX -> ASCIZ filename
  712. Return: CF clear if successful
  713.         AX = CX = value set with AX=4307h
  714.     CF set on error
  715.         AX = error code (see #1020 at AH=59h/BX=0000h)
  716. SeeAlso: AX=4307h
  717. --------O-214307-----------------------------
  718. INT 21 - DR DOS 6.0 - SET FILE OWNER
  719.     AX = 4307h
  720.     CX = ??? (owner identification number?)
  721.     DS:DX -> ASCIZ filename
  722. Return: CF clear if successful
  723.     CF set on error
  724.         AX = error code (see #1020 at AH=59h/BX=0000h)
  725. SeeAlso: AX=4306h
  726. --------N-214310-----------------------------
  727. INT 21 - Banyan VINES 2.1+ - GET EXTENDED FILE ATTRIBUTES
  728.     AX = 4310h
  729.     DS:DX -> ASCIZ filename
  730. Return: CF clear if successful
  731.         CH = attributes (see #0767)
  732.     CF set on error
  733.         AX = error code (01h,02h,03h,05h) (see #1020 at AH=59h/BX=0000h)
  734. Note:    the filename may be a directory but must be on a VINES file service
  735. SeeAlso: AX=4300h,AX=4311h,AH=B6h,INT 2F/AX=110Fh
  736. --------N-214311-----------------------------
  737. INT 21 - Banyan VINES 2.1+ - SET EXTENDED FILE ATTRIBUTES
  738.     AX = 4311h
  739.     CH = new attributes (see #0767)
  740.     DS:DX -> ASCIZ filename
  741. Return: CF clear if successful
  742.     CF set on error
  743.         AX = error code (01h,02h,03h,05h) (see #1020 at AH=59h/BX=0000h)
  744. Note:    the filename may be a directory but must be on a VINES file service
  745. SeeAlso: AX=4301h,AX=4305h,AX=4310h,INT 2F/AX=110Eh
  746.  
  747. Bitfields for VINES extended file attributes:
  748. Bit(s)    Description    (Table 0767)
  749.  7    unused
  750.  6    shareable
  751.  5    execute-only
  752.  4-0    unused
  753. --------u-214321BX0000-----------------------
  754. INT 21 - Q87, Q387 - INSTALLATION CHECK
  755.     AX = 4321h
  756.     BX = 0000h
  757.     EAX = 87654321h (entire EAX value is required, not just AX)
  758. Return: EAX = 12345678h if installed
  759. Program: Q387 (renamed to Q87 as of v3.7) is a math coprocessor emulator from
  760.       Quickware
  761. Note:    this function is available only in virtual-86 mode in older versions;
  762.       newer versions also provide it in MS Windows 16- and 32-bit protected
  763.       mode
  764. SeeAlso: AX=4321h/BX=0001h,AX=4321h/BX=0002h,INT 67/AX=4321h
  765. --------u-214321BX0001-----------------------
  766. INT 21 - Q87, Q387 - ENABLE EMULATOR
  767.     AX = 4321h
  768.     BX = 0001h
  769.     EAX = 87654321h (entire EAX value is required, not just AX)
  770. Desc:    enable the emulator by setting the CPU MSW's EM bit and updating
  771.       the BIOS equipment list
  772. Note:    this function is available only in virtual-86 mode in older versions;
  773.       newer versions also provide it in MS Windows 16- and 32-bit protected
  774.       mode
  775. SeeAlso: AX=4321h/BX=0000h,AX=4321h/BX=0002h
  776. --------u-214321BX0002-----------------------
  777. INT 21 - Q87, Q387 - DISABLE EMULATOR
  778.     AX = 4321h
  779.     BX = 0002h
  780.     EAX = 87654321h (entire EAX value is required, not just AX)
  781. Desc:    disable the emulator by clearing the CPU MSW's EM bit and updating
  782.       the BIOS equipment list
  783. Note:    this function is available only in virtual-86 mode in older versions;
  784.       newer versions also provide it in MS Windows 16- and 32-bit protected
  785.       mode
  786. SeeAlso: AX=4321h/BX=0000h,AX=4321h/BX=0001h
  787. --------O-214380-----------------------------
  788. INT 21 - Novell DOS 7 - UNDELETE PENDING DELETE FILE
  789.     AX = 4380h
  790.     ???
  791. Return: ???
  792. SeeAlso: AH=41h,AX=4381h
  793. --------O-214381-----------------------------
  794. INT 21 - Novell DOS 7 - PURGE PENDING DELETE FILE
  795.     AX = 4381h
  796.     ???
  797. Return: ???
  798. SeeAlso: AH=41h,AX=4380h
  799. --------D-214400-----------------------------
  800. INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
  801.     AX = 4400h
  802.     BX = handle
  803. Return: CF clear if successful
  804.         DX = device information word (see #0768)
  805.         AX destroyed
  806.     CF set on error
  807.         AX = error code (01h,05h,06h) (see #1020 at AH=59h/BX=0000h)
  808. Notes:    value in DH corresponds to high byte of device driver's attribute word
  809.       if handle refers to a character device
  810.     Novell NetWare reportedly does not return a drive number in bits 5-0
  811.       for a disk file
  812. SeeAlso: AX=4401h,INT 2F/AX=122Bh
  813.  
  814. Bitfields for device information word:
  815. Bit(s)    Description    (Table 0768)
  816.  character device
  817.   14    device driver can process IOCTL requests (see AX=4402h"DOS 2+")
  818.   13    output until busy supported
  819.   11    driver supports OPEN/CLOSE calls
  820.    7    set (indicates device)
  821.    6    EOF on input
  822.    5    raw (binary) mode
  823.    4    device is special (uses INT 29)
  824.    3    clock device
  825.    2    NUL device
  826.    1    standard output
  827.    0    standard input
  828.  disk file
  829.   15    file is remote (DOS 3.0+)
  830.   14    don't set file date/time on closing (DOS 3.0+)
  831.   11    media not removable
  832.    8    (DOS 4 only) generate INT 24 if no disk space on write or read past
  833.       end of file
  834.    7    clear (indicates file)
  835.    6    file has not been written
  836.   5-0    drive number (0 = A:)
  837. SeeAlso: INT 29
  838. --------D-214401-----------------------------
  839. INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
  840.     AX = 4401h
  841.     BX = handle (must refer to character device)
  842.     DX = device information word (see #0768)
  843.         (DH must be zero)
  844. Return: CF clear if successful
  845.     CF set on error
  846.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  847. SeeAlso: AX=4400h,INT 2F/AX=122Bh
  848. --------D-214402-----------------------------
  849. INT 21 - DOS 2+ - IOCTL - READ FROM CHARACTER DEVICE CONTROL CHANNEL
  850.     AX = 4402h
  851.     BX = file handle referencing character device
  852.     CX = number of bytes to read
  853.     DS:DX -> buffer
  854. Return: CF clear if successful
  855.         AX = number of bytes actually read
  856.     CF set on error
  857.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  858. Note:    format of data is driver-specific
  859.       (also see separate entries below for some specific cases)
  860. SeeAlso: AX=4400h,AX=4403h"DOS",AX=4404h"DOS",INT 2F/AX=122Bh
  861. --------N-214402-----------------------------
  862. INT 21 - Network Driver Interface Specification (NDIS) 2.0.1 - PROTOCOL MANAGER
  863.     AX = 4402h
  864.     BX = file handle for device "PROTMAN$"
  865.     CX = 000Eh (size of request block)
  866.     DS:DX -> request block (see #0769,#0770,#0771,#0772,#0773,#0777,#0778)
  867. Return: CF clear if successful
  868.         AX = number of bytes actually read
  869.     CF set on error
  870.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  871. SeeAlso: AX=4402h"FTPSOFT"
  872.  
  873. Format of NDIS request block for GetProtocolManagerInfo:
  874. Offset    Size    Description    (Table 0769)
  875.  00h    WORD    01h
  876.  02h    WORD    returned status (see #0779)
  877.  04h    DWORD    returned pointer to structure representing parsed user config
  878.  08h    DWORD    unused
  879.  0Ch    WORD    returned BCD version of NDIS on which Protocol Manager is based
  880. SeeAlso: #0770,#0771,#0772,#0773,#0774,#0775,#0776,#0777,#0778
  881.  
  882. Format of NDIS request block for RegisterModule:
  883. Offset    Size    Description    (Table 0770)
  884.  00h    WORD    02h
  885.  02h    WORD    returned status (see #0779)
  886.  04h    DWORD    pointer to module's common characteristics table (see #0780)
  887.  08h    DWORD    pointer to list of modules to which the module is to be bound
  888.  0Ch    WORD    unused
  889. SeeAlso: #0769,#0771,#0772,#0773,#0774,#0775,#0776,#0777,#0778
  890.  
  891. Format of NDIS request block for BindAndStart:
  892. Offset    Size    Description    (Table 0771)
  893.  00h    WORD    03h
  894.  02h    WORD    returned status (see #0779)
  895.  04h    DWORD    caller's virtual address in FailingModules structure
  896.  08h    DWORD    unused
  897.  0Ch    WORD    unused
  898. SeeAlso: #0769,#0770,#0772,#0773,#0774,#0775,#0776,#0777,#0778
  899.  
  900. Format of NDIS request block for GetProtocolManagerLinkage:
  901. Offset    Size    Description    (Table 0772)
  902.  00h    WORD    04h
  903.  02h    WORD    returned status (see #0779)
  904.  04h    DWORD    returned dispatch point
  905.  08h    DWORD    unused
  906.  0Ch    WORD    returned protocol manager DS
  907. Note:    the dispatch point may be called as follows instead of using this IOCTL
  908.     STACK: WORD  protocol manager DS
  909.            DWORD pointer to request block
  910.     Return: AX = returned status
  911.         STACK popped
  912. SeeAlso: #0769,#0770,#0771,#0773,#0774,#0775,#0776,#0777,#0778
  913.  
  914. Format of NDIS request block for GetProtocolIniPath:
  915. Offset    Size    Description    (Table 0773)
  916.  00h    WORD    05h
  917.  02h    WORD    returned status (see #0779)
  918.  04h    DWORD    pointer to a buffer for the ASCIZ pathname of PROTOCOL.INI
  919.  08h    DWORD    unused
  920.  0Ch    WORD    buffer length
  921. SeeAlso: #0769,#0770,#0771,#0772,#0774,#0775,#0776,#0777,#0778
  922.  
  923. Format of NDIS request block for RegisterProtocolManagerInfo:
  924. Offset    Size    Description    (Table 0774)
  925.  00h    WORD    06h
  926.  02h    WORD    returned status (see #0779)
  927.  04h    DWORD    pointer to structure containing parsed user config file
  928.  08h    DWORD    unused
  929.  0Ch    WORD    length of structure
  930. SeeAlso: #0769,#0770,#0771,#0772,#0773,#0775,#0776,#0777,#0778
  931.  
  932. Format of NDIS request block for InitAndRegister:
  933. Offset    Size    Description    (Table 0775)
  934.  00h    WORD    07h
  935.  02h    WORD    returned status (see #0779)
  936.  04h    DWORD    unused
  937.  08h    DWORD    poitner to ASCIZ name of the module to be prebind initialized
  938.  0Ch    WORD    unused
  939. SeeAlso: #0769,#0770,#0771,#0772,#0773,#0774,#0776,#0777,#0778
  940.  
  941. Format of NDIS request block for UnbindAndStop:
  942. Offset    Size    Description    (Table 0776)
  943.  00h    WORD    08h
  944.  02h    WORD    returned status (see #0779)
  945.  04h    DWORD    failing modules as for BindAndStart
  946.  08h    DWORD    if not 0000h:0000h, pointer to ASCIZ name of module to unbind
  947.         if 0000h:0000h, terminate a set of previously dynamically
  948.           bound protocol modules
  949.  0Ch    WORD    unused
  950. SeeAlso: #0769,#0770,#0771,#0772,#0773,#0774,#0775,#0777,#0778
  951.  
  952. Format of NDIS request block for BindStatus:
  953. Offset    Size    Description    (Table 0777)
  954.  00h    WORD    09h
  955.  02h    WORD    returned status (see #0779)
  956.  04h    DWORD    must be 0000h:0000h
  957.         on return, points to root tree
  958.  08h    DWORD    0000h:0000h
  959.  0Ch    WORD    unused under DOS
  960. SeeAlso: #0769,#0770,#0771,#0772,#0773,#0774,#0775,#0776,#0778
  961.  
  962. Format of NDIS request block for RegisterStatus:
  963. Offset    Size    Description    (Table 0778)
  964.  00h    WORD    0Ah
  965.  02h    WORD    returned status (0000h, 0008h, 002Ch) (see #0779)
  966.  04h    DWORD    0000h:0000h
  967.  08h    DWORD    pointer to 16-byte ASCIZ module name
  968.  0Ch    WORD    0000h
  969. Note:    not supported by the 10NET v5.0 PROTMAN$ driver
  970. SeeAlso: #0769,#0770,#0771,#0772,#0773,#0774,#0775,#0776,#0777
  971.  
  972. (Table 0779)
  973. Values for NDIS status code:
  974.  0000h    success
  975.  0001h    wait for release--protocol has retained control of the data buffer
  976.  0002h    request queued
  977.  0003h    frame not recognized
  978.  0004h    frame rejected
  979.  0005h    frame should be forwarded
  980.  0006h    out of resource
  981.  0007h    invalid parameter
  982.  0008h    invalid function
  983.  0009h    not supported
  984.  000Ah    hardware error
  985.  000Bh    transmit error
  986.  000Ch    unrecognized destination
  987.  000Dh    buffer too small
  988.  0020h    already started
  989.  0021h    binding incomplete
  990.  0022h    driver not initialized
  991.  0023h    hardware not found
  992.  0024h    hardware failure
  993.  0025h    configuration failure
  994.  0026h    interrupt conflict
  995.  0027h    MAC incompatible
  996.  0028h    initialization failed
  997.  0029h    no binding
  998.  002Ah    network may be disconnected
  999.  002Bh    incompatible OS version
  1000.  002Ch    already registered
  1001.  002Dh    path not found
  1002.  002Eh    insufficient memory
  1003.  002Fh    info not found
  1004.  00FFh    general failure
  1005.  F000h-FFFFh reserved for vendor-specific codes, treated as general failure
  1006.  
  1007. Format of NDIS common characteristics table:
  1008. Offset    Size    Description    (Table 0780)
  1009.  00h    WORD    size of table in bytes
  1010.  02h    BYTE    NDIS major version
  1011.  03h    BYTE    NDIS minor version
  1012.  04h    WORD    reserved
  1013.  06h    BYTE    module major version
  1014.  07h    BYTE    module minor version
  1015.  08h    DWORD    module function flag bits
  1016.         bit 0: binding at upper boundary supported
  1017.         bit 1: binding at lower boundary supported
  1018.         bit 2: dynamically bound
  1019.         bits 3-31 reserved, must be 0
  1020.  0Ch 16 BYTEs    ASCIZ module name
  1021.  1Ch    BYTE    upper boundary protocol level (see #0781)
  1022.  1Dh    BYTE    upper boundary interface type
  1023.         for MACs: 1 = MAC
  1024.         for data links and transports: to be defined
  1025.         for session: 1 = NCB
  1026.         any level: 0 = private (ISV-defined)
  1027.  1Eh    BYTE    lower boundary protocol level (see #0781)
  1028.  1Fh    BYTE    lower boundary interface type
  1029.         same as offset 1Dh
  1030.  20h    WORD    module ID filled in by protocol manager
  1031.  22h    WORD    module DS
  1032.  24h    DWORD    system request entry point
  1033.  28h    DWORD    pointer to service-specific characteristics (see #0783,#0785)
  1034.         0000h:0000h if none
  1035.  2Ch    DWORD    pointer to service-specific status, or 0000h:0000h if none
  1036.           (see #0786)
  1037.  30h    DWORD    pointer to upper dispatch table (see #0782)
  1038.         0000h:0000h if none
  1039.  34h    DWORD    pointer to lower dispatch table (see #0782)
  1040.         0000h:0000h if none
  1041.  38h  2 DWORDs    reserved, must be 0
  1042. Note:    for compatibility with NDIS 1.x.x, a major version of 00h is
  1043.       interpreted as 01h
  1044.  
  1045. (Table 0781)
  1046. Values for NDIS boundary protocol level:
  1047.  00h    physical
  1048.  01h    Media Access Control
  1049.  02h    Data link
  1050.  03h    network
  1051.  04h    transport
  1052.  05h    session
  1053.  FFh    not specified
  1054.  
  1055. Format of NDIS dispatch table:
  1056. Offset    Size    Description    (Table 0782)
  1057.  00h    DWORD    -> common characteristics table (see #0780)
  1058.  04h  4 BYTEs    ???
  1059.  08h    DWORD    -> ??? function (called with 12 bytes of stack arguments)
  1060.  0Ch    DWORD    -> ??? function (called with 10 bytes of stack arguments)
  1061.  10h    DWORD    -> ??? function (called with 16 bytes of stack arguments)
  1062.  14h    DWORD    -> ??? function (called with 4 bytes of stack arguments)
  1063.  18h    DWORD    -> ??? function (called with 18 bytes of stack arguments)
  1064.  1Ch    DWORD    -> ??? function (called with 12 bytes of stack arguments)
  1065.  
  1066. Format of MAC Service-Specific Characteristics Table:
  1067. Offset    Size    Description    (Table 0783)
  1068.  00h    WORD    length of table in bytes
  1069.  02h 16 BYTEs    ASCIZ MAC type name, "802.3", "802.4", "802.5", "802.6", "DIX",
  1070.           "DIX+802.3", "APPLETALK", "ARCNET", "FDDI", "SDLC", "BSC",
  1071.           "HDLC", or "ISDN"
  1072.  12h    WORD    length of station addresses in bytes
  1073.  14h 16 BYTEs    permanent station address
  1074.  24h 16 BYTEs    current station address
  1075.  34h    DWORD    current functional adapter address (00000000h if none)
  1076.  38h    DWORD    pointer to multicast address list
  1077.  3Ch    DWORD    link speed in bits/sec
  1078.  40h    DWORD    service flags (see #0784)
  1079.  44h    WORD    maximum frame size which may be both sent and received
  1080.  46h    DWORD    total transmit buffer capacity in bytes
  1081.  4Ah    WORD    transmit buffer allocation block size in bytes
  1082.  4Ch    DWORD    total receive buffer capacity in bytes
  1083.  50h    WORD    receive buffer allocation block size in bytes
  1084.  52h  3 BYTEs    IEEE vendor code
  1085.  55h    BYTE    vendor adapter code
  1086.  56h    DWORD    pointer to ASCIZ vendor adapter description
  1087.  5Ah    WORD    IRQ used by adapter
  1088.  5Ch    WORD    transmit queue depth
  1089.  5Eh    WORD    maximum supported number of data blocks in buffer descriptors
  1090.  60h  N BYTEs    vendor-specific info
  1091. SeeAlso: #0785
  1092.  
  1093. Bitfields for service flags:
  1094. Bit(s)    Description    (Table 0784)
  1095.  0    supports broadcast
  1096.  1    supports multicast
  1097.  2    supports functional/group addressing
  1098.  3    supports promiscuous mode
  1099.  4    station address software settable
  1100.  5    statistics always current
  1101.  6    supports InitiateDiagnostics
  1102.  7    supports loopback
  1103.  8    MAC does primarily ReceiveChain indications instead of ReceiveLookahead
  1104.     indications
  1105.  9    supports IBM source routing
  1106.  10    supports MAC reset
  1107.  11    supports Open/Close adapter
  1108.  12    supports interrupt request
  1109.  13    supports source routing bridge
  1110.  14    supports GDT virtual addresses (OS/2 version)
  1111.  15    multiple TransferDatas allowed durign a single indication
  1112.  16    MAC normally sets FrameSize = 0 in ReceiveLookahead
  1113.  17-31    reserved, must be 0
  1114.  
  1115. Format of NetBIOS Service-Specific Characteristics Table:
  1116. Offset    Size    Description    (Table 0785)
  1117.  00h    WORD    length of table in bytes
  1118.  02h 16 BYTEs    ASCIZ type name of NetBIOS module
  1119.  12h    WORD    NetBIOS module code
  1120.  14h  N BYTEs    vendor-specific info
  1121. SeeAlso: #0783
  1122.  
  1123. Format of MAC Service-Specific Status Table:
  1124. Offset    Size    Description    (Table 0786)
  1125.  00h    WORD    length of table in bytes
  1126.  02h    DWORD    seconds since 0:00 1/1/70 when diagnostics last run
  1127.         (FFFFFFFFh = never)
  1128.  06h    DWORD    MAC status bits (see #0787)
  1129.  0Ah    WORD    current packet filter flags (see #0788)
  1130.  0Ch    DWORD    pointer to media-specific status table or 0000h:0000h
  1131.  10h    DWORD    seconds past 0:00 1/1/70 of last ClearStatistics
  1132.  14h    DWORD    total frames received (FFFFFFFFh = not counted)
  1133.  18h    DWORD    frames with CRC error (FFFFFFFFh = not counted)
  1134.  1Ch    DWORD    total bytes received (FFFFFFFFh = not counted)
  1135.  20h    DWORD    frames discarded--no buffer space (FFFFFFFFh = not counted)
  1136.  24h    DWORD    multicast frames received (FFFFFFFFh = not counted)
  1137.  28h    DWORD    broadcast frames received (FFFFFFFFh = not counted)
  1138.  2Ch    DWORD    frames with errors (FFFFFFFFh = not counted)
  1139.  30h    DWORD    overly large frames (FFFFFFFFh = not counted)
  1140.  34h    DWORD    frames less than minimum size (FFFFFFFFh = not counted)
  1141.  38h    DWORD    multicast bytes received (FFFFFFFFh = not counted)
  1142.  3Ch    DWORD    broadcast bytes received (FFFFFFFFh = not counted)
  1143.  40h    DWORD    frames discarded--hardware error (FFFFFFFFh = not counted)
  1144.  44h    DWORD    total frames transmitted (FFFFFFFFh = not counted)
  1145.  48h    DWORD    total bytes transmitted (FFFFFFFFh = not counted)
  1146.  4Ch    DWORD    multicast frames transmitted (FFFFFFFFh = not counted)
  1147.  50h    DWORD    broadcast frames transmitted (FFFFFFFFh = not counted)
  1148.  54h    DWORD    broadcast bytes transmitted (FFFFFFFFh = not counted)
  1149.  58h    DWORD    multicast bytes transmitted (FFFFFFFFh = not counted)
  1150.  5Ch    DWORD    frames not transmitted--timeout (FFFFFFFFh = not counted)
  1151.  60h    DWORD    frames not transmitted--hardware error (FFFFFFFFh = not countd)
  1152.  64h  N BYTEs    vendor-specific info
  1153.  
  1154. Bitfields for MAC status bits:
  1155. Bit(s)    Description    (Table 0787)
  1156.  0-2    operational status
  1157.     000 hardware not installed
  1158.     001 hardware failed startup diagnostics
  1159.     010 hardware configuration problem
  1160.     011 hardware fault
  1161.     100 operating marginally due to soft faults
  1162.     101 reserved
  1163.     110 reserved
  1164.     111 hardware fully operational
  1165.  3    MAC bound
  1166.  4    MAC open
  1167.  5    diagnostics in progress
  1168.  6-31    reserved
  1169.  
  1170. Bitfields for packet filter flags:
  1171. Bit(s)    Description    (Table 0788)
  1172.  0    directed/multicast or group/functional
  1173.  1    broadcast
  1174.  2    promiscuous
  1175.  3    all source routing
  1176.  4-15    reserved, must be zero
  1177. --------I-214402-----------------------------
  1178. INT 21 U - IBM SYSTEM 36/38 WORKSTATION EMULATION - VDI.SYS - GET ???
  1179.     AX = 4402h
  1180.     BX = handle for character device "GDMS"
  1181.     CX = number of bytes to read (>= 4)
  1182.     DS:DX -> buffer (see #0789)
  1183. Return: CF set on error
  1184.         AX = error code (see #1020 at AH=59h/BX=0000h)
  1185.     CF clear if successful
  1186.         AX = number of bytes read
  1187.  
  1188. Format of System 36/38 emulator returned data:
  1189. Offset    Size    Description    (Table 0789)
  1190.  00h  4 BYTEs    ???
  1191.  04h    DWORD    pointer to ???
  1192.  08h  4 BYTEs    ???
  1193. --------m-214402-----------------------------
  1194. INT 21 U - LASTBYTE.SYS v1.19 - IOCTL - GET ??? TABLE
  1195.     AX = 4402h
  1196.     BX = handle for device "LA$TBYTE"
  1197.     CX = 0004h
  1198.     DS:DX -> DWORD to hold address of 39-byte table of ???
  1199. Return: CF set on error
  1200.         AX = error code (see #1020 at AH=59h/BX=0000h)
  1201.     CF clear if successful
  1202.         AX = number of bytes read
  1203. Program: LASTBYTE.SYS is part of the shareware "The Last Byte" memory
  1204.       management package by Key Software Products
  1205. SeeAlso: AX=4402h"HIGHUMM"
  1206. --------m-214402-----------------------------
  1207. INT 21 - HIGHUMM.SYS v1.17+ - IOCTL - GET API ADDRESS
  1208.     AX = 4402h
  1209.     BX = handle for device "KSP$UMM"
  1210.     CX = 0004h
  1211.     DS:DX -> DWORD to hold entry point (see #0790)
  1212. Return: CF set on error
  1213.         AX = error code (see #1020 at AH=59h/BX=0000h)
  1214.     CF clear if successful
  1215.         AX = number of bytes read
  1216. Program: HIGHUMM.SYS is part of the shareware "The Last Byte" memory
  1217.       management package by Key Software Products
  1218. SeeAlso: AX=4402h"LASTBYTE"
  1219.  
  1220. (Table 0790)
  1221. Call HIGHUMM.SYS entry point with:
  1222.     AH = 00h allocate UMB (same as XMS function 10h) (see INT 2F/AX=4310h)
  1223.         DX = size in paragraphs
  1224.         Return: BX = segment number (if successful)
  1225.             DX = size of requested block/size of largest block
  1226.     AH = 01h deallocate UMB (same as XMS func 11h) (see INT 2F/AX=4310h)
  1227.         DX = segment number of UMB
  1228.     AH = 02h request a bank-switched memory block
  1229.         DX = size in paragraphs
  1230.         Return: BX = segment number (if successful)
  1231.             DX = size of requested block/size of largest block
  1232.     AH = 03h release a bank-switched memory block
  1233.         DX = segment number
  1234.     AH = 04h transfer data to/from high memory
  1235.         DS:SI -> source
  1236.         ES:DI -> destination
  1237.         CX = length in bytes
  1238.         Note: enables bank-switched memory, does the copy, then disables
  1239.         bank-switched memory
  1240.     AH = 05h get a word from bank-switched memory
  1241.         ES:DI -> word to read
  1242.         Return: DX = word
  1243.     AH = 06h put a word to bank-switched memory
  1244.         ES:DI -> word to write
  1245.         DX = word
  1246.     AH = 07h put a byte to bank-switched memory
  1247.         ES:DI -> byte to write
  1248.         DL = byte
  1249.     AH = 08h enable bank-switched memory
  1250.         DS:SI -> 6-byte status save area
  1251.     AH = 09h disable bank-switched memory
  1252.         DS:SI -> 6-byte save area from enable call (AH=08h)
  1253.     AH = 0Ah assign name to UMB or high bank-switched block
  1254.         DX = segment number
  1255.         DS:SI -> 8-byte blank-padded name
  1256.     AH = 0Bh locate UMB block by name
  1257.         DS:SI -> 8-byte blank-padded name
  1258.         Return: BX = segment number (if successful)
  1259.             DX = size of block
  1260.     AH = 0Ch locate bank-switched block by name
  1261.         DS:SI -> 8-byte blank-padded name
  1262.         Return: BX = segment number (if successful)
  1263.             DX = size of block
  1264. Return: AX = status code
  1265.         0001h successful
  1266.         0000h failed
  1267.         BL = error code
  1268.             80h not implemented
  1269.             B0h insufficient memory, smaller block available
  1270.             B1h insufficient memory, no blocks available
  1271.             B2h invalid segment number
  1272. Note:    only functions 00h and 01h are always available; the remaining
  1273.       functions are only enabled if the proper commandline switch is given
  1274. --------c-214402-----------------------------
  1275. INT 21 - SMARTDRV.SYS v3.x only - IOCTL - GET CACHE STATUS
  1276.     AX = 4402h
  1277.     BX = file handle for device "SMARTAAR"
  1278.     CX = number of bytes to read (min 28h)
  1279.     DS:DX -> buffer for status record (see #0791)
  1280. Return: CF clear if successful
  1281.         AX = number of bytes actually read
  1282.     CF set on error
  1283.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  1284. Note:    NCache2 (from the Norton Utilities v8.0) attempts to support this
  1285.       interface, but does not do so correctly, often hanging the system;
  1286.       one should use the SmartDrive v4.x or NCache private interfaces
  1287.       (see INT 2F/AX=4A10h/BX=0000h,INT 2F/AX=FE00h/DI=4E55h)
  1288. SeeAlso: AX=4403h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  1289.  
  1290. Format of SMARTDRV status record:
  1291. Offset    Size    Description    (Table 0791)
  1292.  00h    BYTE    write-through flag (always 01h)
  1293.  01h    BYTE    writes should be buffered (always 00h)
  1294.  02h    BYTE    cache enabled if 01h
  1295.  03h    BYTE    driver type (01h extended memory, 02h expanded)
  1296.  04h    WORD    clock ticks between cache flushes (currently unused)
  1297.  06h    BYTE    cache contains locked tracks if nonzero
  1298.  07h    BYTE    flush cache on INT 19 reboot if nonzero
  1299.  08h    BYTE    cache full track writes if nonzero
  1300.  09h    BYTE    double buffering (for VDS) state (00h off, 01h on, 02h dynamic)
  1301.  0Ah    DWORD    original INT 13 vector
  1302.  0Eh    BYTE    minor version number
  1303.  0Fh    BYTE    major version number
  1304.  10h    WORD    unused
  1305.  12h    WORD    sectors read            \
  1306.  14h    WORD    sectors already in cache     > may be scaled rather than
  1307.  16h    WORD    sectors already in track buffer /  absolute counts
  1308.  18h    BYTE    cache hit rate in percent
  1309.  19h    BYTE    track buffer hit rate in percent
  1310.  1Ah    WORD    total tracks in cache
  1311.  1Ch    WORD    number of tracks in use
  1312.  1Eh    WORD    number of locked tracks
  1313.  20h    WORD    number of dirty tracks
  1314.  22h    WORD    current cache size in 16K pages
  1315.  24h    WORD    original (maximum) cache size in 16K pages
  1316.  26h    WORD    minimum cache size in 16K pages
  1317.  28h    DWORD    pointer to byte flag to increment for locking cache contents
  1318. --------d-214402-----------------------------
  1319. INT 21 - CD-ROM device driver - IOCTL INPUT
  1320.     AX = 4402h
  1321.     BX = file handle referencing character device for CD-ROM driver
  1322.     CX = number of bytes to read
  1323.     DS:DX -> control block (see #0793)
  1324. Return: CF clear if successful
  1325.         AX = number of bytes actually read
  1326.     CF set on error
  1327.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  1328. Note:    the data returned depends on the first byte of the control block; the
  1329.       remainder of the control block is filled by the driver
  1330. SeeAlso: AX=4403h"CD-ROM",INT 2F/AX=0802h
  1331.  
  1332. (Table 0792)
  1333. Values for CD-ROM data being requested:
  1334.  00h    device driver header address
  1335.  01h    drive head location
  1336.  02h    reserved
  1337.  03h    error statistics
  1338.  04h    audio channel info
  1339.  05h    raw drive bytes (uninterpreted and device-specific)
  1340.  06h    device status
  1341.  07h    sector size
  1342.  08h    volume size
  1343.  09h    media change status
  1344.  0Ah    audio disk info
  1345.  0Bh    audio track info
  1346.  0Ch    audio Q-Channel info
  1347.  0Dh    audio sub-channel info
  1348.  0Eh    UPC code
  1349.  0Fh    audio status info
  1350.  
  1351. Format of CD-ROM control block:
  1352. Offset    Size    Description    (Table 0793)
  1353.  00h    BYTE    data being requested (see #0792)
  1354. ---function 00h---
  1355.  01h    DWORD    device driver header address (see also AH=52h,#0987)
  1356. ---function 01h---
  1357.  01h    BYTE    addressing mode
  1358.         00h HSG
  1359.         01h Red Book
  1360.  02h    DWORD    current location of drive's head
  1361.         logical sector number in HSG mode
  1362.         frame/second/minute/unused in Red Book mode
  1363.         (HSG sector = minute * 4500 + second * 75 + frame - 150)
  1364. ---function 03h---
  1365.  01h  N BYTEs    undefined as of 5 Aug 88 specification
  1366. ---function 04h---
  1367.  01h    BYTE    input channel (0-3) for output channel 0
  1368.  02h    BYTE    volume for output channel 0
  1369.  03h    BYTE    input channel (0-3) for output channel 1
  1370.  04h    BYTE    volume for output channel 1
  1371.  05h    BYTE    input channel (0-3) for output channel 2
  1372.  06h    BYTE    volume for output channel 2
  1373.  07h    BYTE    input channel (0-3) for output channel 3
  1374.  08h    BYTE    volume for output channel 3
  1375. Notes:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  1376.       right prime; a volume of 00h is off
  1377.     the default setting is for each input channel to be assigned to the
  1378.       same-numbered output channel at full (FFh) volume
  1379. ---function 05h---
  1380.  01h    BYTE    number of bytes read
  1381.  02h 128 BYTEs    buffer for drive bytes
  1382. ---function 06h---
  1383.  01h    DWORD    device parameters (see #0794)
  1384. ---function 07h---
  1385.  01h    BYTE    read mode
  1386.         00h cooked
  1387.         01h raw
  1388.  02h    WORD    sector size in bytes
  1389. ---function 08h---
  1390.  01h    DWORD    volume size in sectors
  1391. ---function 09h---
  1392.  01h    BYTE    media change status
  1393.         00h don't know
  1394.         01h media unchanged
  1395.         FFh media has been changed
  1396. ---function 0Ah---
  1397.  01h    BYTE    lowest audio track number
  1398.  02h    BYTE    highest audio track number
  1399.  03h    DWORD    start address of lead-out track (Red Book format)
  1400. --function 0Bh---
  1401.  01h    BYTE    track number (set by caller)
  1402.  02h    DWORD    starting point of track (Red Book format)
  1403.  06h    BYTE    track control info
  1404.         bits 15,14,12: track type (notice: bits not contiguous!)
  1405.             000 two audio channels, no pre-emphasis
  1406.             001 two audio channels with pre-emphasis
  1407.             010 data track
  1408.             100 four audio channels, no pre-emphasis
  1409.             101 four audio channels with pre-emphasis
  1410.             other reserved
  1411.         bit 13: digital copy permitted
  1412. ---function 0Ch---
  1413.  01h    BYTE    CONTROL and ADR byte (as received from drive)
  1414.  02h    BYTE    track number
  1415.  03h    BYTE    point or index
  1416.  04h    BYTE    minute    \
  1417.  05h    BYTE    second     > running time within track
  1418.  06h    BYTE    frame    /
  1419.  07h    BYTE    zero
  1420.  08h    BYTE    "AMIN" or "PMIN"     \
  1421.  09h    BYTE    "ASEC" or "PSEC"      > running time on disk
  1422.  0Ah    BYTE    "AFRAME" or "PFRAME" /
  1423. ---function 0Dh---
  1424.  01h    DWORD    starting frame address (Red Book format)
  1425.  05h    DWORD    transfer address
  1426.  09h    DWORD    number of sectors to read
  1427. Note:    copies 96 bytes of sub-channel info per sector into buffer
  1428. ---function 0Eh---
  1429.  01h    BYTE    CONTROL and ADR byte
  1430.  02h  7 BYTEs    UPC/EAN code (13 BCD digits,low-order nybble of last byte is 0)
  1431.  09h    BYTE    zero
  1432.  0Ah    BYTE    "AFRAME"
  1433. ---function 0Fh---
  1434.  ??? documentation not yet available
  1435.  01h    WORD    pause status (0000h not paused, 0001h paused)
  1436.  03h    DWORD    audio play start address
  1437.  07h    DWORD    ??? audio play length or end address
  1438.  
  1439. Bitfields for CD-ROM device parameters:
  1440. Bit(s)    Description    (Table 0794)
  1441.  0    door open
  1442.  1    door unlocked
  1443.  2    supports raw reading in addition to cooked
  1444.  3    writable
  1445.  4    can play audio/video tracks
  1446.  5    supports interleaving
  1447.  6    reserved
  1448.  7    supports prefetch requests
  1449.  8    supports audio channel control
  1450.  9    supports Red Book addressing in addition to HSG
  1451.  10    audio is playing
  1452.  11    no disk in drive
  1453.  12    supports R-W subchannels
  1454. --------m-214402-----------------------------
  1455. INT 21 - Quarterdeck - QEMM-386 v5+ - GET API ENTRY POINT
  1456.     AX = 4402h
  1457.     BX = file handle for device "QEMM386$"
  1458.     CX = 0004h
  1459.     DS:DX -> DWORD buffer for API entry point
  1460. Return: CF clear if successful
  1461.         buffer filled (refer to INT 67/AH=3Fh for entry point parameters)
  1462.     CF set on error
  1463.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  1464. Note:    Quarterdeck recently (June 1993) documented this function, but the
  1465.       documentation incorrectly states that it is only available for
  1466.       QEMM 6+
  1467. SeeAlso: AX=4402h"HOOKROM",INT 2F/AX=D201h/BX=5145h,INT 67/AH=3Fh
  1468. --------Q-214402-----------------------------
  1469. INT 21 U - Quarterdeck - HOOKROM.SYS - GET HOOKED VECTOR TABLE
  1470.     AX = 4402h
  1471.     BX = file handle for device "HOOKROM$"
  1472.     CX = 0004h
  1473.     DS:DX -> DWORD buffer for address of hooked vector table (see #0795)
  1474. Return: CF clear if successful
  1475.         DS:DX buffer filled
  1476.     CF set on error
  1477.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  1478. SeeAlso: AX=4402h/SF=01h
  1479.  
  1480. Format of HOOKROM.SYS hooked vector table entry:
  1481. Offset    Size    Description    (Table 0795)
  1482.  00h  5 BYTEs    FAR jump to actual interrupt handler
  1483.         (end of table if first byte is not EAh)
  1484.  05h    BYTE    interrupt vector number
  1485. --------d-214402-----------------------------
  1486. INT 21 - Advanced SCSI Programming Interface (ASPI) - INTERFACE
  1487.     AX = 4402h
  1488.     BX = file handle for device "SCSIMGR$"
  1489.     CX = 0004h or 0005h (refer to notes below)
  1490.     DS:DX -> buffer for result (see #0796), set to zeros before call
  1491. Return: CF clear if successful
  1492.         AX = 0004h or 0005h (refer to notes below)
  1493.     CF set on error
  1494.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  1495. Notes:    the variant of the call requesting five bytes is an UNDOCUMENTED
  1496.       extension supported by Adaptec's ASPI2DOS.SYS, ASPI4DOS.SYS, and
  1497.       ASPI7DOS.SYS; if made of a host manager which does not support the
  1498.       variant, only four bytes will be returned.  If the variant is
  1499.       supported, Adaptec's WINASPI.DLL assumes that the host manager is
  1500.       an "advanced" one which operates in either real or protected mode
  1501.       (and thus does not require a DPMI INT 31/AX=0301h call to be invoked
  1502.       from protected mode).     Support of the five-byte variant also appears
  1503.       to imply that an advanced ASPI host manager uses no temporary
  1504.       storage space except the SRB (see #0798) and the stack, and that it
  1505.       is fully reentrant.
  1506.     if called with a standard request for four bytes, even Adaptec's
  1507.       advanced drivers return only the requested four bytes containing the
  1508.       ASPI entry point address
  1509.     the function address is called with the address of a SCSI Request
  1510.       Block (see #0798) on the stack and the caller must clean up the
  1511.       stack
  1512. SeeAlso: AX=440Ch"ASPITAPE",INT 11/AH=FFh"WD7000"
  1513.  
  1514. Format of ASPI IOCTL result:
  1515. Offset    Size    Description    (Table 0796)
  1516.  00h    DWORD    function address
  1517.  04h    BYTE    number of SCSI host adapters supported by host manager
  1518.  
  1519. (Table 0797)
  1520. Values for ASPI request number:
  1521.  00h    "HA_INQ"    host adapter inquiry
  1522.  01h    "GET_TYPE"    get device type
  1523.  02h    "EXEC_SIO"    execute SCSI I/O
  1524.  03h    "ABORT_SRB"    abort SRB
  1525.  04h    "RESET_DEV"    reset SCSI device
  1526.  05h    "SET_HAPRMS"    set host adapter parameters
  1527.  06h    get disk drive information
  1528.  
  1529. Format of SCSI Request Block (64 bytes):
  1530. Offset    Size    Description    (Table 0798)
  1531.  00h    BYTE    request number (see #0797)
  1532.  01h    BYTE    request status (see #0799)
  1533.  02h    BYTE    host adapter ID
  1534.  03h    BYTE    request flags (see #0800)
  1535.  04h    DWORD    reserved
  1536. ---request 00h---
  1537.  08h    BYTE    (ret) number of host adapters
  1538.  09h    BYTE    (ret) target adapter ID
  1539.  0Ah 16 BYTEs    (ret) SCSI manager ID
  1540.  1Ah 16 BYTEs    (ret) host adapter ID
  1541.  2Ah 16 BYTEs    (ret) host adapter-unique parameters
  1542. ---request 01h---
  1543.  08h    BYTE    target ID
  1544.  09h    BYTE    logical unit number
  1545.  0Ah    BYTE    (ret) device type (see #0803)
  1546. ---request 02h---
  1547.  08h    BYTE    target ID
  1548.  09h    BYTE    logical unit number
  1549.  0Ah    DWORD    data allocation length
  1550.  0Eh    BYTE    sense allocation length
  1551.  0Fh    DWORD    data buffer pointer
  1552.  13h    DWORD    next request pointer (for linking)
  1553.  17h    BYTE    CDB length
  1554.  18h    BYTE    (ret) host adapter status (see #0798)
  1555.  19h    BYTE    (ret) target status (see #0802)
  1556.  1Ah    DWORD    post routine address
  1557.  1Eh    WORD    real mode Post DS
  1558.  20h    DWORD    SRB pointer
  1559.  24h    WORD    reserved
  1560.  26h    DWORD    SRB physical address
  1561.  2Ah 22 BYTEs    SCSIMGR$ workspace
  1562.  40h  N BYTEs    CCB, including sense data (20-24 bytes)
  1563. ---request 03h---
  1564.  08h    DWORD    address of SRB to abort
  1565. ---request 04h---
  1566.  08h    BYTE    target ID
  1567.  09h    BYTE    logical unit number
  1568.  0Ah 14 BYTEs    reserved
  1569.  18h    BYTE    (ret) host adapter status (see #0801)
  1570.  19h    BYTE    (ret) target status (see #0802)
  1571.  1Ah    DWORD    post routine address
  1572.  1Eh 34 BYTEs    workspace
  1573. ---request 05h---
  1574.  08h 16 BYTEs    host adapter-unique parameters
  1575. ---request 06h---
  1576.  08h    BYTE    target ID
  1577.  09h    BYTE    logical unit number
  1578.  0Ah    BYTE    disk drive flags (see #0804)
  1579.  0Bh    BYTE    INT 13h drive number
  1580.  0Ch    BYTE    preferred head number translation
  1581.  0Dh    BYTE    preferred sector size translation
  1582.  0Eh 10 BYTEs    reserved
  1583. SeeAlso: #0805
  1584.  
  1585. (Table 0799)
  1586. Values for ASPI request status:
  1587.  00h    not done yet
  1588.  01h    completed successfully
  1589.  02h    aborted by host
  1590.  04h    SCSI I/O error
  1591.  80h    invalid
  1592.  81h    no adapter
  1593.  82h    no device attached
  1594.  else    status
  1595.  
  1596. Bitfields for ASPI request flags:
  1597. Bit(s)    Description    (Table 0800)
  1598.  0    posting enabled
  1599.  1    linking enabled
  1600.  2    direction
  1601.  3    transfer from SCSI target to host
  1602.  4    transfer from host to SCSI target
  1603. Note:    no data is transferred if both bits 3 and 4 are set
  1604.  
  1605. (Table 0801)
  1606. Values for host adapter status:
  1607.  00h    no error detected
  1608.  11h    select timeout
  1609.  12h    data overrun
  1610.  13h    bus error
  1611.  14h    bus failure
  1612.  
  1613. (Table 0802)
  1614. Values for target status:
  1615.  00h    no status
  1616.  02h    sense data stored in SRB
  1617.  08h    target busy
  1618.  18h    reservation error
  1619.  
  1620. (Table 0803)
  1621. Values for device type:
  1622.  00h    disk drive
  1623.  01h    tape drive (streamer)
  1624.  02h    printer
  1625.  03h    processor
  1626.  04h    WORM drive
  1627.  05h    CD-ROM drive
  1628.  06h    scanner
  1629.  07h    optical drive
  1630.  08h    autochanger
  1631.  09h    communications device
  1632.  
  1633. (Table 0804)
  1634. Values for disk drive flags:
  1635.  00h    no INT 13 access
  1636.  01h    INT 13 with DOS access
  1637.  02h    INT 13 without DOS access
  1638.  03h    invalid flags
  1639.  
  1640. Format of CCB:
  1641. Offset    Size    Description    (Table 0805)
  1642.  00h    BYTE    command code (see #0806)
  1643.  01h    BYTE    flags
  1644.         bits 4-0: vary by function
  1645.         bits 7-5: logical unit number
  1646.  02h    BYTE    "adr_1"
  1647.  03h    BYTE    "adr_0"
  1648.  04h    BYTE    length
  1649.  05h    BYTE    control
  1650.     ...
  1651.  06h/0Ah 14 BYTEs buffer for sense data (see #0807)
  1652. SeeAlso: #0798
  1653.  
  1654. (Table 0806)
  1655. Values for CCB command code:
  1656.  00h    test unit ready
  1657.  01h    rewind
  1658.  03h    request sense data
  1659.  05h    get block size limits
  1660.  08h    Group 0 read
  1661.  0Ah    Group 0 write
  1662.  10h    write file marks
  1663.  11h    SCSI Space (set position?)
  1664.  12h    SCSI Inquire
  1665.  15h    set mode information
  1666.  16h    reserve SCSI device
  1667.  17h    release SCSI device
  1668.  19h    erase
  1669.  1Ah    request mode information
  1670.  1Bh    load/unload media
  1671.  1Dh    request target self-check
  1672.  24h    set window parameters
  1673.  25h    get window parameters
  1674.  28h    Group 1 read
  1675.  2Ah    Group 1 write
  1676.  31h    document feeder control
  1677.  34h    get scan data status
  1678. ---vendor-specific commands---
  1679.  D3h    get document feeder status
  1680.  D4h    set document feeder mode
  1681.  
  1682. Format of sense data:
  1683. Offset    Size    Description    (Table 0807)
  1684.  00h    BYTE    error code (bit 7 set if valid)
  1685.  01h    BYTE    segment number
  1686.  02h    BYTE    sense key
  1687.         bit 6: EOM
  1688.         bit 5: ILI
  1689.         bits 0-3: sense key (see #0808)
  1690.  03h  4 BYTEs    information bytes
  1691.  07h    BYTE    additional sense length (0Ah)
  1692.  08h  4 BYTEs    command-specific information
  1693.  0Ch    BYTE    additional sense code
  1694.  0Dh    BYTE    additional sense code qualifier
  1695.  0Eh    BYTE    field replaceable unit code
  1696.  0Fh  3 BYTEs    sense key specific bytes
  1697.  
  1698. (Table 0808)
  1699. Values for sense key:
  1700.  00h    no sense data
  1701.  02h    SCSI unit not ready
  1702.  03h    media error
  1703.  04h    unrecoverable hardware error
  1704.  05h    illegal parameter in CDB
  1705.  06h    target has been reset
  1706.  0Bh    target aborted command
  1707. --------m-214402-----------------------------
  1708. INT 21 U - Qualitas 386MAX v6.00+ - IOCTL INPUT - GET STATE
  1709.     AX = 4402h
  1710.     BX = file handle for device "386MAX$$"
  1711.     CX = number of bytes to read
  1712.     DS:DX -> BYTE 03h followed by 386MAX state buffer (see #0809)
  1713. Return: CF clear if successful
  1714.         buffer at DS:DX+1 filled
  1715.         AX = number of bytes actually copied
  1716.     CF set on error
  1717.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  1718. Notes:    if the value given in CX is less than the size of the state record
  1719.       (5Ah for v6.01, 66h for v7.00), only a partial state record will be
  1720.       returned
  1721.     the state is 40h bytes for 386MAX (actually ASTEMM) v2.20 ("386MAX$$"
  1722.       did not exist yet, use "QMMXXXX0" and then "EMMXXXX0" instead) and
  1723.       56h bytes for v5.11.
  1724.     to invoke 386MAX API functions, push DX onto the stack, load DX with
  1725.       the word at offset 25h in the returned state, load all other
  1726.       registers as needed for the desired function, and execute an
  1727.       OUT DX,AL or OUT DX,AX; DX will be set to the pushed value on return
  1728.       if it is not otherwise modified by the API function.    For safety,
  1729.       in case a function is not supported or 386MAX is not present, SP
  1730.       should be saved and restored around the API call.
  1731.     Windows 3.1 Standard mode, LAN Manager, and Windows for Workgroups all
  1732.       use the 386MAX API; LAN Manager and Windows for Workgroups reportedly
  1733.       make some calls incorrectly
  1734. SeeAlso: AX=4403h/SF=03h"386MAX",INT 67/AH=3Fh
  1735.  
  1736. Format of 386MAX v6.01+ state:
  1737. Offset    Size    Description    (Table 0809)
  1738.  -1    BYTE    (call) 03h
  1739.  00h  6 BYTEs    signature "386MAX"
  1740.  06h  4 BYTEs    version string "N;NN" or "N.NN" (i.e. "6;01" for v6.01)
  1741.         (';' by default; apparently changed to a period when 386MAX
  1742.         has linked high RAM into DOS's memory chain)
  1743.  0Ah    WORD    segment of low-memory portion of 386MAX.SYS
  1744.  0Ch  2 BYTEs    ???
  1745.  0Eh    WORD    segment of ??? memory block or 0000h
  1746.  10h    WORD    bit flags 1 (see #0810)
  1747.  12h    WORD    starting address of video memory in KB
  1748.  14h  2 BYTEs    ???
  1749.  16h    WORD    total high DOS memory in KB
  1750.  18h  2 BYTEs    ???
  1751.  1Ah    WORD    available shared memory in KB
  1752.  1Ch    WORD    KBytes extended memory used by 386MAX
  1753.  1Eh  2 BYTEs    ???
  1754.  20h    WORD    total extended memory in KB
  1755.  22h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX INT 15 functions
  1756.  24h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX API functions
  1757.           (see #0823)
  1758.  26h    WORD    ??? (depends on DOS version)
  1759.  28h    WORD    size of ??? in paragraphs
  1760.  2Ah    DWORD    machine type (see #0818)
  1761.  2Eh    DWORD    -> first DOS memory control block
  1762.  32h    WORD    system configuration flags (see #0811)
  1763.  34h    WORD    debugging flags 1 (see #0812)
  1764.  36h    WORD    debugging flags 2 (see #0813)
  1765.  38h  2 BYTEs    ???
  1766.  3Ah    WORD    segment of first MCB in high memory chain
  1767.  3Ch    WORD    feature flags 1 (see #0815)
  1768.  3Eh    WORD    feature flags 2 (see #0816)
  1769.  40h    WORD    feature flags 3 (see #0817)
  1770.  42h    WORD    segment of first 386MAX control block??? (see #0819)
  1771.  44h    WORD    amount of memory to report available on INT 15/AH=88h
  1772.  46h  4 BYTEs    ???
  1773.  4Ah    WORD    number of K at start of address space swapped with fast
  1774.           extended memory (SWAP= parameter)
  1775.  4Ch  2 BYTEs    ???
  1776.  4Eh    WORD    segment address of ???
  1777.  50h    WORD    debugging flags 3 (see #0814)
  1778.  52h    DWORD    old INT 21h
  1779.  56h    DWORD    pointer to 386MAX's EMS (INT 67h) handler
  1780. ---386MAX v7.00---
  1781.  5Ah    DWORD    KB of extended memory managed by 386MAX
  1782.  5Eh    DWORD    bytes of extended memory (EXT= parameter)
  1783.  62h  4 BYTEs    ???
  1784.  
  1785. Bitfields for 386MAX bit flags 1:
  1786. Bit(s)    Description    (Table 0810)
  1787.  1    ???
  1788.  2    allow A20 to be enabled/disabled???
  1789.  3    ??? (cleared by calling INT 67 functions or starting MSWindows)
  1790.  4    high RAM present???
  1791.  5    386MAX in AUTO mode
  1792.  6    386MAX enabled
  1793.  7    386MAX is providing EMS services
  1794.  8    ??? (affects API function 08h)
  1795.  9    A20 gate closed (A20 disabled) (see INT 15/AX=2402h)
  1796.  10    Weitek support enabled
  1797.  11    ???
  1798.  12    ROMs not shadowed???
  1799.  13    QPMS has been used
  1800.  14    ???
  1801.  15    ???
  1802.  
  1803. Bitfields for 386MAX system configuration flags:
  1804. Bit(s)    Description    (Table 0811)
  1805.  1    ROM compressed???
  1806.  3    ???
  1807.  5    386MAX loaded into high memory
  1808.  6    Microchannel bus
  1809.  7    Weitek math coprocessor detected
  1810.  9    ??? (also generates INT 01 on ??? and INT 03 on ???)
  1811.  11    PC/XT (thus only single 8259 interrupt controller present, DMA only
  1812.         in 1st megabyte, etc)
  1813.  13    LMLTOP= specified
  1814.  14    enable A20 control???
  1815.  15    ???
  1816.  
  1817. Bitfields for 386MAX debugging flags 1:
  1818. Bit(s)    Description    (Table 0812)
  1819.  0    DEBUG=LED
  1820.  1    DEBUG=X67
  1821.  2    DEBUG=INV
  1822.  3    DEBUG=EMSPTED
  1823.  4    DEBUG=JMP
  1824.  5    DEBUG=CALL
  1825.  6    DEBUG=HLT
  1826.  7    DEBUG=PMR
  1827.  8    DEBUG=CR3
  1828.  9    DEBUG=CAPS or DEBUG=INT
  1829.  10    DEBUG=RC
  1830.  11    DEBUG=ROM
  1831.  12    DEBUG=XM
  1832.  13    DEBUG=SOR
  1833.  14    DEBUG=XR
  1834.  15    DEBUG=EMSERR (generate INT 01 on returning error from EMS call)
  1835.  
  1836. Bitfields for 386MAX debugging flags 2:
  1837. Bit(s)    Description    (Table 0813)
  1838.  0    DEBUG=ROMSWAP
  1839.  1    DEBUG=UNSHADOWROM
  1840.  2    DEBUG=COMPROM
  1841.  3    DEBUG=DPMIPHYS
  1842.  4    DEBUG=ALLROM
  1843.  5    DEBUG=VMS
  1844.  6    DEBUG=XMS (generate INT 01 on XMS calls)
  1845.  7    DEBUG=I06
  1846.  8    DEBUG=VCPI
  1847.  9    DEBUG=XDMA
  1848.  10    DEBUG=X09
  1849.  13    DEBUG=I67 (generate INT 01 on every INT 67 call)
  1850.  14    DEBUG=EVM (generate INT 01 on entering V86 mode)
  1851.  15    DEBUG=EMSSAVE or DEBUG=VDS
  1852.  
  1853. Bitfields for 386MAX debugging flags 3:
  1854. Bit(s)    Description    (Table 0814)
  1855.  10    DEBUG=EPM
  1856.  12    DEBUG=ABIOS
  1857.  13    DEBUG=XMSPTED
  1858.  14    DEBUG=TIME
  1859.  15    DEBUG=SCRUB
  1860.  
  1861. Bitfields for 386MAX feature flags 1:
  1862. Bit(s)    Description    (Table 0815)
  1863.  1    Weitek present
  1864.  2    no DPMI services
  1865.  3    NODMA
  1866.  4    TERSE
  1867.  5    NOROM
  1868.  6    NOPARITY
  1869.  8    NOFLEX (IGNOREFLEXFRAME)
  1870.  11    don't create UMBs
  1871.  12    don't backfill below video memory (NOLOW)
  1872.  13    FRAME= specified
  1873.  14    EXT= specified
  1874.  15    NOEMS, allow prior expanded memory manager to provide EMS
  1875.  
  1876. Bitfields for 386MAX feature flags 2:
  1877. Bit(s)    Description    (Table 0816)
  1878.  0    UNSHIFT specified (FORCEA20 disabled)
  1879.  1    NOXRAM
  1880.  2    NOSCSI specified
  1881.  3    SCREEN specified
  1882.  4    enabled EISADMA
  1883.  5    slow DMA
  1884.  6    RESETKEYB specified
  1885.  7    ???
  1886.  9    TOP384
  1887.  10    ???
  1888.  11    NOWARMBOOT
  1889.  12    USE= specified
  1890.  13    ROM= specified
  1891.  
  1892. Bitfields for 386MAX feature flags 3:
  1893. Bit(s)    Description    (Table 0817)
  1894.  0    Windows3 support enabled
  1895.  1    SHADOWROM
  1896.  2    don't compress ROM (NOCOMPROM)
  1897.  3    ??? (related to PRGREG=)
  1898.  4    ??? (related to PRGREG=)
  1899.  5    SHADOWRAM
  1900.  6    DOS4 specified
  1901.  7    NOLOADHIGH
  1902.  8    NOPULSE
  1903.  11    FORCEA20
  1904.  12    DMA buffer enabled
  1905.  13    NOSCRUB
  1906.  15    NOFRAME
  1907.  
  1908. Bitfields for 386MAX machine type:
  1909. Bit(s)    Description    (Table 0818)
  1910.  12    Amstrad
  1911.  13    Epson
  1912.  14    Zenith Data Systems
  1913.  15    "ASEM"
  1914.  16    NEC
  1915.  17    "HPRS" model codes 69h and 6Ah
  1916.  18    Dell
  1917.  19    "CA"
  1918.  20    ITT (Xtra Business Systems/Alcatel)
  1919.  21    Toshiba 5100
  1920.  22    Olivetti
  1921.  23    Quadram Quad386 (BIOS model FEh, submodel A6h)
  1922.  24    Tandy???
  1923.  25    AST 386
  1924.  26    INBOARD, ??? version
  1925.  27    INBOARD, ??? version
  1926.  28    INBOARD, ??? version
  1927.  29    "HPRS"
  1928.  30    Compaq 386
  1929.  31    JET386
  1930.  
  1931. Format of 386MAX control block:
  1932. Offset    Size    Description    (Table 0819)
  1933.  00h    WORD    segment of next block (FFFFh if last)
  1934.  02h    WORD    segment of previous block (FFFFh if first)
  1935.  04h 12 BYTEs    filename
  1936.  10h    WORD    resident size in paragraphs
  1937.  12h    WORD    environment size???
  1938.  14h    WORD    real prsent environment size + 1 (0000h if ENVSAVE used)
  1939.  16h  2 BYTEs    ???
  1940.  18h    DWORD    initial size or SIZE=n in 386LOAD commandline
  1941.  1Ch    DWORD    SIZE=-1 ???
  1942.  20h    DWORD    SIZE= ???
  1943.  24h    BYTE    PRGREG= if specified, else FFh
  1944.  25h    BYTE    ENVREG= if specified, else FFh
  1945.  26h    BYTE    FlexFrame (00h not present, 01h present)
  1946.  27h  3 BYTEs    ???
  1947.  2Ah    BYTE    GROUP= or 00h if not present
  1948.  2Bh    BYTE    ???
  1949.  2Ch    WORD    PSP
  1950.  
  1951. Format of 386MAX high memory info record:
  1952. Offset    Size    Description    (Table 0820)
  1953.  00h    WORD    segment address of memory region
  1954.  02h    WORD    size of memory region in paragraphs
  1955.  04h    BYTE    type or flags???
  1956.         00h if locked out
  1957.         02h if EMS page frame
  1958.         04h if high RAM
  1959.         42h if ROM
  1960.  05h    BYTE    ???
  1961.  
  1962. Format of 386MAX ROM shadowing record:
  1963. Offset    Size    Description    (Table 0821)
  1964.  00h    WORD    logical start segment of ROM??? (may be used by BlueMAX when it
  1965.           squeezes together the ROMs to make room)
  1966.  02h    WORD    physical start segment of ROM
  1967.  04h  2 BYTEs    ???
  1968.  06h    WORD    size of shadowed ROM in paragraphs
  1969.  08h  2 BYTEs    ???
  1970.  0Ah    WORD    flags
  1971.         bit 15: shadowing enabled for this ROM???
  1972.         bit 14: ???
  1973.         bit 13: ???
  1974.         bit 12: ???
  1975.         bit 10: ???
  1976.  
  1977. (Table 0822)
  1978. Values for 386MAX memory type:
  1979.  00h    unused by EMS
  1980.  01h    DOS
  1981.  04h    page frame overlapping ROM???
  1982.  80h    high memory
  1983.  84h    page frame???
  1984.  87h    video ROM???
  1985. Note:    the type may be 00h (unused) if the 16K page is split among different
  1986.       uses (such as ROM and high RAM)
  1987.  
  1988. (Table 0823)
  1989. Call 386MAX API (via OUT DX,AL) with:
  1990.     STACK: WORD value for DX
  1991.     AH = 00h unused
  1992.         Return: AH = 84h (unsupported function)
  1993.     AH = 01h get high memory information
  1994.         ES:DI -> buffer for array of high memory info records
  1995.             (see #0820)
  1996.         Return: CX = number of records placed in buffer
  1997.     AH = 02h get shadowed ROM info
  1998.         ES:DI -> buffer for array of ROM shadowing records (see #0821)
  1999.         Return: CX = number of records placed in buffer
  2000.     AH = 03h get 386MAX state
  2001.         ES:DI -> 90-byte buffer for state (see #0809)
  2002.         Return: AH = 00h (successful)
  2003.             buffer filled
  2004.     AH = 04h get memory types???
  2005.         ES:DI -> buffer for memory type info (array of bytes, one per
  2006.             16K page) (see #0822)
  2007.         Return:    CX = number of bytes placed in buffer
  2008.     AH = 05h get page table entries
  2009.         AL = A20 control (00h enable A20 first, 01h leave unchanged)
  2010.         CX = buffer size in bytes (0000h = enough for all memory from
  2011.             given start to end of memory managed by 386MAX)
  2012.         SI = first K to report (rounded down to 4K page)
  2013.         ES:DI -> buffer for returned page table entries
  2014.         Return: CX = number of bytes returned (four per 4K page)
  2015.             ES:DI buffer filled
  2016.     AH = 06h get memory speed info
  2017.         ES:DI -> buffer for memory speed records (see #0824)
  2018.         Return: AH = 00h (successful)
  2019.             CX = number of bytes placed in buffer
  2020.         Note:    this function can take over a second to execute
  2021.     AH = 07h map/unmap multiple handle pages
  2022.         DX = EMS handle (on stack)
  2023.         STACK: DWORD -> EMS mapping record
  2024.         Return:    AH = status (00h,80h,83h,8Ah,8Bh)
  2025.         Format of EMS mapping record:
  2026.         Offset    Size    Description
  2027.          00h    WORD    function
  2028.                 0000h use physical page numbers
  2029.                 0001h use segment addresses
  2030.          02h    WORD    EMS handle
  2031.          04h    WORD    number of mapping entries following
  2032.          06h 2N WORDs    logical page number and physical page/segment
  2033.                 logical page FFFFh means unmap physical page
  2034.         SeeAlso: INT 67/AH=50h
  2035.     AH = 08h "EMM2_GOREAL" check whether possible to disable 386MAX
  2036.         AL = ??? (00h or nonzero)
  2037.         Return: AH = status (00h OK, A4h not possible at this time)
  2038.         Note:    if AL=00h, this function always returns success
  2039.     AH = 09h toggle Bit Flags 1 flags
  2040.         BX = bitmask of bit flags 1's flags to toggle (see #0810)
  2041.         Return: AH = 00h (successful)
  2042.         Note:    enables A20 first
  2043.     AH = 0Ah toggle Debugging Flags 1 flags
  2044.         BX = bitmask of Debugging Flags 1's bits to toggle (see #0812)
  2045.         Return: AH = 00h (successful)
  2046.         Notes:    enables A20 first
  2047.             does ??? if bit 3 on after specified bits are toggled
  2048.     AH = 0Bh toggle Debugging Flags 2 flags
  2049.         BX = bitmask of Debugging Flags 2's bits to toggle (see #0813)
  2050.         Return: AH = 00h (successful)
  2051.         Note:    enables A20 first
  2052.     AH = 0Ch toggle feature flags 3
  2053.         BX = bitmask of feature flags 3's bits to toggle (see #0817)
  2054.         Return: AH = 00h (successful)
  2055.         Note:    enables A20 first
  2056.     AH = 0Dh specify 386MAX high-memory location
  2057.         BX = segment address of high-memory real-mode portion of 386MAX
  2058.         CX = current segment of real-mode stub???
  2059.         Return: AH = status (00h successful)
  2060.             ???
  2061.     AH = 0Eh CRT controller register virtualization
  2062.         AL = subfunction
  2063.             00h allow access to CRTC I/O ports 03B4h/03B5h, 03D4h/03D5h
  2064.             01h trap accesses to CRTC I/O ports
  2065.     AH = 0Fh reboot system
  2066.         Return: never
  2067.     AH = 10h unused
  2068.         Return: AH = 84h (unsupported function)
  2069.     AH = 11h get high memory information
  2070.         ES:DI -> 96-byte buffer for high memory info
  2071.         Return: AH = 00h (successful)
  2072.             ES:DI buffer filled
  2073.         Notes:    each byte in buffer contains bit flags for a 4K page in
  2074.               the A000h-FFFFh region
  2075.                 bit 0: page is writeable
  2076.                 bit 1: physical address same as linear address
  2077.                 bit 2: EMS page frame
  2078.                 bit 6: page is part of the QPMS window
  2079.             this function can take over a second to execute,
  2080.               because it does a 128K read for each page in an
  2081.               attempt to flush any RAM cache the system may have
  2082.     AH = 12h shadow RAM mapping
  2083.         AL = subfunction
  2084.             00h unshadow ROMs (except page FFh if NOWARMBOOT set)
  2085.             01h map shadow RAM into ROM regions???
  2086.         Return: AH = 00h (successful) if AL=00h or 01h
  2087.             AH = 8Fh otherwise
  2088.     AH = 13h shadow RAM page protection
  2089.         AL = subfunction
  2090.             00h set all shadowed ROM 4K pages to read-only
  2091.             01h set all shadowed ROM 4K pages to read-write
  2092.         Return: AH = 00h (successful) if AL=00h or 01h
  2093.             AH = 8Fh otherwise
  2094.     AH = 14h get Programmable Option Select info???
  2095.         ES:DI -> 54-byte buffer for POS data???
  2096.         Return: AH = 00h if successful
  2097.             AH = A4h on error
  2098.         Note:    the buffer consists of nine 6-byte fields; the first
  2099.               eight for slots 1-8, the last for the system board
  2100.     AH = 15h ???
  2101.         ???
  2102.         Return: ???
  2103.     AH = 16h get 386MAX memory usage screen
  2104.         ES:DI -> buffer for memory info display
  2105.         CX = size of buffer in bytes
  2106.         Return:    ES:DI buffer filled with '$'-terminated string (if
  2107.                 large enough to hold entire usage screen)
  2108.         Note:    the screen is 0303h bytes in v7.00
  2109.     AH = 17h Windows 3 startup/termination
  2110.         AL = subfunction
  2111.             00h Windows3 initializing
  2112.             DX (on stack) = Windows startup flags
  2113.             DI = Windows version number (major in upper byte)
  2114.             ES:BX = 0000h:0000h
  2115.             DS:SI = 0000h:0000h
  2116.             Return: CX = 0000h if OK for Windows to load
  2117.                    <> 0 if Windows should not load
  2118.                 ES:BX -> startup info structure
  2119.                 DS:SI -> Virtual86 mode enable/disable callback
  2120.             01h Windows3 terminating
  2121.             ES:BX -> ???
  2122.             DX (on stack) = Windows exit flags
  2123.             Return: ???
  2124.     AH = 18h QPMS (Qualitas Protected Memory Services)
  2125.         AL = subfunction
  2126.             00h get QPMS configuration
  2127.             Return: BX = starting segment of QPMS memory window
  2128.                 CX = number of 4K pages reserved for QPMS???
  2129.                 DX = number of 4K pages in QPMS window???
  2130.             01h map QPMS memory page???
  2131.             BX = 4K page number within memory reserved for QPMS???
  2132.             CL = 4K page number within QPMS memory window???
  2133.             02h mark all QPMS memory read-only
  2134.             03h mark all QPMS memory read-write
  2135.         Return: AH = status (00h,8Ah,8Bh,8Fh)
  2136.     AH = 19h get linear address for physical address
  2137.         EDX = physical address (low word on stack)
  2138.         Return: AH = status
  2139.                 00h successful
  2140.                 EDX = linear address at which physical address
  2141.                     may be accessed
  2142.                 8Bh physical address currently not addressable
  2143.         Note:    enables A20 first
  2144.     AH = 1Ah set page table entry
  2145.         EDX = new page table entry (low word on stack)
  2146.         ESI = linear address of page to map (bits 0-11 clear)
  2147.         Return: AH = status (00h,8Bh)
  2148.         Note:    enables A20 first
  2149.     AH = 1Bh get ???
  2150.         Return: AH = status
  2151.             BX = ???
  2152.             CX = number of ???
  2153.             EDX = physical address of ???
  2154.     AH = 1Ch get original interrupt vector
  2155.         AL = interrupt vector (00h-7Fh)
  2156.         Return: AH = 00h (successful)
  2157.             EDX = original vector before 386MAX loaded (segment in
  2158.                 high word, offset in low word)
  2159.         Note:    no range checking is performed; requests for INTs 80h-
  2160.               FFh will return random values
  2161.     AH = 1Dh display string???
  2162.         SI = ???
  2163.         Return: AH = 00h (successful)
  2164.             ???
  2165.         Note:    this function appears to be broken in v7.00
  2166.     AH = 1Eh get memory info
  2167.         ES:DI -> memory info (see #0825)
  2168.         Return: ???
  2169.     AH = 1Fh get DPMI host information
  2170.         Return: AX = 0000h if successful
  2171.             BX = DPMI flags (see #2407 at INT 31/AX=0400h)
  2172.             CL = CPU type (02h = 80286, 03h = 80386, etc.)
  2173.             DX = DPMI ver supported (DH=major, DL=2-digit minor)
  2174.             SI = ???
  2175.             ES???:DI -> ???
  2176.         Note:    NOP if NODPMI switch specified
  2177.     AH = 20h (v7.00) get ???
  2178.         AL = index of ???
  2179.         Return: EDX = ??? for specified ???
  2180.     AH = 21h (v7.00) STACKS support
  2181.         AL = 00h get STACKS parameters
  2182.         Return: BX = ??? (0060h for v7.00)
  2183.             CX = number of stacks for hardware interrupts
  2184.             DX = size of each stack in bytes
  2185.             SI = ??? (low and high bytes are separate values)
  2186.             DI = ??? (low and high bytes are separate values)
  2187.                 low byte = logical page number set by subfn 02h
  2188.             ES = ???
  2189.         AL = 01h set ??? "EMM2_DSTKS"
  2190.         EBX = ???
  2191.         ECX = ???
  2192.         AL = 02h set ???
  2193.         BL = logical page number for ??? (00h-03h)
  2194.         Return: AH = status (00h,8Ah)
  2195.     AH = 22h (v7.00) call ??? for every load module
  2196.         AL = which function to call
  2197.         00h call ???
  2198.         else call ????
  2199.         Return: AH = 00h
  2200.         Note: if AL=00h, calls the protected-mode function pointed at by
  2201.         the DWORD at offset 22h from the start of each module installed
  2202.         by a LOAD= directive; if AL<>00h, it calls the function
  2203.         pointed at by the DWORD at offset 28h of the load module
  2204.     AH = 23h (v7.00) ???
  2205.         AL = 00h set ???
  2206.         BL = ???
  2207.         Return:    AH = 00h or unchanged (depending on ???)
  2208.         AL = 01h set ???
  2209.         BL = ???
  2210.         BH = ???
  2211.         CX = ???
  2212.         DX = ??? (on top of stack)
  2213.         Return: AH = status (00h if successful, 8Fh once table full)
  2214.         Note:    this call adds one entry to an internal table on each
  2215.               call, until the table is full
  2216.         AL = 02h get ???
  2217.         CX = size of buffer
  2218.         ES:DI -> buffer for ??? (60 bytes total data)
  2219.         Return: CX = number of bytes actually returned
  2220.         Note:    returns the array storing the values set with AX=2301h
  2221.         Format of one entry in array:
  2222.         Offset    Size    Description
  2223.          00h    BYTE    ??? (BL from subfn 01h)
  2224.          01h    WORD    ??? (CX from subfn 01h)
  2225.          03h    BYTE    ??? (BH from subfn 01h)
  2226.          04h    WORD    ??? (DX from subfn 01h)
  2227.         AL = 03h set ??? name/path
  2228.         ES:DI -> buffer containing ASCIZ ???
  2229.         AL = 04h get ???
  2230.         ES:DI -> buffer for ASCIZ ???
  2231.         Note: the ASCIZ string for subfunctions 03h and 04h does not appear
  2232.         to be used by 386MAX, and may serve merely for communication
  2233.         between two other Qualitas programs
  2234.     AH = 24h (v7.00) high memory control
  2235.         AL = 00h get high memory state
  2236.         Return: BX = current state
  2237.                 00h high memory removed from DOS memory chain
  2238.                 01h high memory included in DOS memory chain
  2239.         AL = 01h set high memory state
  2240.         BX = new state
  2241.             00h high memory removed from DOS memory chain
  2242.             01h high memory included in DOS memory chain
  2243.             else
  2244.             Return: ??? (error, but return varies according to ???)
  2245.     AH = 25h (v7.00) remove high RAM from DOS memory chain
  2246.     AH = 26h (v7.00) ???
  2247.         BX = ???
  2248.         CX = ???
  2249.         SI = ???
  2250.         DI = ???
  2251.         Return: AH = status
  2252.             BX = ???
  2253.             CX = ???
  2254.     AH = 27h (v7.00) ???
  2255.         AL = 00h get ???
  2256.         Return: BX = number of paragraphs for ???
  2257.         AL = 01h ???
  2258.         BX = ???
  2259.         ES??? = ???
  2260.         AL = 02h ???
  2261.         ???
  2262.         AL = 03h ???
  2263.         CX = ???
  2264.         DX = ???
  2265.         ES??? = ???
  2266.         Return: ???
  2267.     AH = 28h (v7.00) get ???
  2268.         Return: AH = status (00h,8Fh) (see #2897 at INT 67/AH=40h)
  2269.             if AH=00h,
  2270.                 CX = ???
  2271.                 DX = ???
  2272.     AH = 29h (v7.00) get ???
  2273.         Return: AX = ???
  2274.     AH = 40h-5Dh EMS services (see INT 67/AH=40h, etc.)
  2275.     AH = DEh VCPI services (see INT 67/AX=DE00h, etc.)
  2276. Return: AH = status (as for EMS INT 67 calls)
  2277.         00h successful
  2278.         80h internal error
  2279.         81h hardware malfunction
  2280.         83h invalid handle
  2281.         84h    undefined function
  2282.         8Ah invalid logical page nuber
  2283.         8Bh illegal physical page number
  2284.         8Fh undefined subfunction
  2285.         A4h access denied
  2286.         etc.
  2287.     STACK popped (value placed in DX if no specific return value for DX)
  2288.  
  2289. Format of 386MAX memory speed record:
  2290. Offset    Size    Description    (Table 0824)
  2291.  00h    DWORD    page table entry for 4K page
  2292.  04h    WORD    number of microticks (840ns units) required for REP LODSD of
  2293.           entire 4K page
  2294.  
  2295. Format of 386MAX memory info [array]:
  2296. Offset    Size    Description    (Table 0825)
  2297.  00h    DWORD    linear start address
  2298.  04h    DWORD    size in bytes
  2299.  08h    WORD    XMS handle (if next byte = 04h)
  2300.         ??? (if next byte = 05h)
  2301.         ??? (if next byte = 06h)
  2302.         ??? (if next byte = 13h)
  2303.         ??? (if next byte = 14h)
  2304.         ??? (if next byte = 15h)
  2305.         ??? (if next byte = 23h)
  2306.         ??? (if next byte = 24h)
  2307.         ??? (if next byte = 26h)
  2308.         else unused
  2309.  0Ah    BYTE    type
  2310.         00h = ???, 01h = VDISK,
  2311.         02h = INT 15h extended memory, 03h = ??? extended,
  2312.         04h = XMS handle's memory, 05h = ???, 06h = ???, 07h = ???,
  2313.         08h = ???, 09h = ???, 0Ah = ???, 0Bh = ???,
  2314.         11h = ???, 12h = ???, 14h = ???, 15h = ???,
  2315.         19h = ???, 1Ah = ???, 1Bh = ???,
  2316.         1Ch = ???, 1Dh = ???, 1Eh = ???, 1Fh = ???,
  2317.         20h = ???, 21h = ???, 23h = ???, 24h = ???,
  2318.         26h = ???
  2319.  0Bh    BYTE    ??? (00h for types 00h-03h, 07h-0Bh, 19h-21h;
  2320.              80h for types 04h/13h-15h/23h-26h;
  2321.             ??? for type 05h)
  2322. --------V-214402-----------------------------
  2323. INT 21 - PGS1600.DEV - IOCTL - GET CONFIGURATION INFO
  2324.     AX = 4402h
  2325.     BX = file handle for device "PGS1600$"
  2326.     CX = 0018h (size of buffer)
  2327.     DS:DX -> configuration buffer (see #0826)
  2328. Return: CF clear if successful
  2329.         buffer filled
  2330.         AX = number of bytes actually copied
  2331.     CF set on error
  2332.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2333. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  2334.       display adapter, which provides a 1600x1200 monochrome display as
  2335.       well as one of two emulations, MDA or CGA.
  2336. SeeAlso: AX=4403h"PGS1600"
  2337.  
  2338. Format of PGS1600.DEV configuration information:
  2339. Offset    Size    Description    (Table 0826)
  2340.  00h    WORD    version (high byte = major, low byte = minor)
  2341.  02h    WORD    board initialisation mode
  2342.  04h    WORD    board I/O address
  2343.         03D0h CGA emulation
  2344.         03B0h MDA emulation
  2345.         0390h no emulation
  2346.         0350h no emulation, alternate
  2347.  06h    WORD    emulation buffer segment
  2348.         B800h    CGA emulation
  2349.         B000h    MDA emulation
  2350.         0000h    no emulation
  2351.  08h    WORD    PG1600 graphics buffer segment
  2352.  0Ah    WORD    number of bytes between consecutive graphic rows
  2353.  0Ch    WORD    horizontal pixel size
  2354.  0Eh    WORD    vertical pixel size
  2355.  10h    WORD    horizontal dots per inch
  2356.  12h    WORD    vertical dots per inch
  2357.  14h    WORD    graphics buffer bits per pixel
  2358.  16h    WORD    monitor bits per pixel
  2359. --------N-214402-----------------------------
  2360. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  2361.     AX = 4402h
  2362.     BX = file handle referencing device "$IPCUST"
  2363.     CX, DS:DX ignored
  2364. Return: CF clear if successful
  2365.         AX destroyed
  2366.     CF set on error
  2367.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2368. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  2369.       version 2.05.     If less than the entire data is read or written,
  2370.       the next read/write continues where the previous one ended; this
  2371.       call and AX=4403h both reset the location at which the next
  2372.       operation starts to zero
  2373.     v2.1+ uses a new configuration method, but allows the installation
  2374.       of IPCUST.SYS for backward compatibility with other software which
  2375.       must read the PC/TCP configuration
  2376. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4403h"IPCUST"
  2377. --------N-214402-----------------------------
  2378. INT 21 - WORKGRP.SYS - GET API ENTRY POINT
  2379.     AX = 4402h
  2380.     BX = file handle for device "NET$HLP$"
  2381.     CX = 0008h
  2382.     DS:DX -> buffer for entry point record (see #0827)
  2383. Return: CF clear if successful
  2384.         AX = number of bytes actually read
  2385.     CF set on error
  2386.         AX = error code
  2387. Program: WORKGRP.SYS is the portion of Microsoft's Workgroup Connection which
  2388.       permits communication with PCs running Windows for Workgroups or
  2389.       LAN Manager
  2390. SeeAlso: AH=3Fh"WORKGRP.SYS"
  2391.  
  2392. Format of WORKGRP.SYS entry point record:
  2393. Offset    Size    Description    (Table 0827)
  2394.  00h    WORD    3633h  \ signature???
  2395.  02h    WORD    EF6Fh  /
  2396.  04h    DWORD    address of entry point (see #0828)
  2397. Note:    first four bytes of buffer must be 6Fh E9h 33h 36h on entry when using
  2398.       IOCTL rather than READ to get the entry point record
  2399.  
  2400. (Table 0828)
  2401. Call WORKGRP entry point with:
  2402.     STACK:    WORD    function number (0000h-0009h)
  2403. Return: STACK unchanged
  2404. SeeAlso: #0829,#0830,#0831,#0832,#0833,#0834,#0835,#0836
  2405.  
  2406. (Table 0829)
  2407. Call WORKGRP function 00h with:
  2408.     STACK:    WORD    0000h (function "get ???")
  2409. Return: DX:AX -> data table
  2410.  
  2411. (Table 0830)
  2412. Call WORKGRP function 01h with:
  2413.     STACK:    WORD    0001h (function "hook ???")
  2414. Return: STACK:    DWORD    pointer to ???
  2415.         WORD    0001h (function number)
  2416.  
  2417. (Table 0831)
  2418. Call WORKGRP function 02h with:
  2419.     STACK:    WORD    0002h (function "unhook ???")
  2420.     ???
  2421. Return: ???
  2422.  
  2423. (Table 0832)
  2424. Call WORKGRP function 03h with:
  2425.     STACK:    WORD    0003h (function "reenable printer port")
  2426.         WORD    LPT port number
  2427. Return: ???
  2428.  
  2429. (Table 0833)
  2430. Call WORKGRP function 04h with:
  2431.     STACK:    WORD    0004h (function "disable printer port")
  2432.         WORD    LPT port number
  2433. Return: ???
  2434.  
  2435. (Table 0834)
  2436. Call WORKGRP function 05h with:
  2437.     STACK:    WORD    0005h (function "???")
  2438.         ???
  2439. Return: ???
  2440.  
  2441. (Table 0835)
  2442. Call WORKGRP function 06h with:
  2443.     STACK:    WORD    0006h (function "???")
  2444. Return: STACK unchanged
  2445.     AX = 0000h
  2446.     DX = 0000h
  2447.  
  2448. (Table 0836)
  2449. Call WORKGRP functions 07h-09h with:
  2450.     STACK:    WORD    0007h-0009h (NOP functions)
  2451. Return: STACK unchanged
  2452.     AX = 0001h
  2453.     DX = 0000h
  2454. --------N-214402-----------------------------
  2455. INT 21 - 10NET v5.0 - 10BEUI.DOS - API
  2456.     AX = 4402h
  2457.     BX = file handle referencing device "10BEUI$"
  2458.     DS:DX -> parameter record (see #0837)
  2459.     CX ignored
  2460. Return: CF clear if successful
  2461.         AX destroyed
  2462.     CF set on error
  2463.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2464. SeeAlso: AX=4402h"10MEMMGR",INT 6F/AH=00h"10NET"
  2465.  
  2466. Format of 10NET 10BEUI.DOS parameter record:
  2467. Offset    Size    Description    (Table 0837)
  2468.  00h    WORD    000Ah (function number???)
  2469.  02h    WORD    ???
  2470.  04h    DWORD    pointer to buffer for ???
  2471.  08h  4 BYTEs    ???
  2472.  0Ch    WORD    transfer size
  2473. --------N-214402-----------------------------
  2474. INT 21 - 10NET v5.0 - 10MEMMGR.SYS - API
  2475.     AX = 4402h
  2476.     BX = file handle referencing device "MEMMGR0$"
  2477.     DS:DX -> 6-byte buffer for interface info (see #0838)
  2478.     CX ignored
  2479. Return: CF clear if successful
  2480.         AX destroyed
  2481.     CF set on error
  2482.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2483. SeeAlso: AX=4402h"10BEUI",INT 6F/AH=00h"10NET"
  2484.  
  2485. Format of 10NET 10MEMMGR.SYS interface info:
  2486. Offset    Size    Description    (Table 0838)
  2487.  00h    DWORD    address of entry point (see #0839)
  2488.  04h    WORD    version (0500h for v5.00)
  2489.  
  2490. (Table 0839)
  2491. Call 10NET 10MEMMGR.SYS entry point with:
  2492.     AL = 01h ???
  2493.         BX = ???
  2494.         Return: CF clear if successful
  2495.             CF set on error
  2496.             AX = error code
  2497.     AL = 02h ???
  2498.         ???
  2499.     AL = 03h ???
  2500.         ???
  2501.     AL = 04h set/restore memory allocation strategy
  2502.         BX = subfunction
  2503.         0000h set strategy
  2504.         0001h restore strategy
  2505.         Return: CF clear if successful
  2506.             CF set on error (if function disabled)
  2507.             various registers destroyed
  2508.     AL = other
  2509.         Return: CF set
  2510.             AX = 0000h
  2511.             BL = 01h
  2512. --------V-214402-----------------------------
  2513. INT 21 - Compaq AG1024.SYS - RGDI - GET DRIVER LOCATION
  2514.     AX = 4402h
  2515.     BX = file handle for device "$$$$RGDI"
  2516.     CX = 0006h (size of returned data)
  2517.     DS:DX -> location record (see #0840)
  2518. Return: CF clear if successful
  2519.         buffer filled
  2520.     CF set on error
  2521.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2522. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  2523. SeeAlso: AX=4403h"RGDI"
  2524.  
  2525. Format of Compaq AG1024.SYS location record:
  2526. Offset    Size    Description    (Table 0840)
  2527.  00h    WORD    signature 55AAh
  2528.  02h    WORD    segment of ???
  2529.  04h    WORD    segment of device driver's code
  2530. --------N-214402-----------------------------
  2531. INT 21 - FTPSOFT.DOS v3.1 - GET ???
  2532.     AX = 4402h
  2533.     BX = file handle for device "FTPSOFT$"
  2534.     CX = size of buffer
  2535.     DS:DX -> buffer for data (see #0841)
  2536. Return: CF clear if successful
  2537.         buffer filled
  2538.     CF set on error
  2539.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2540. Program: FTPSOFT.DOS is a device driver for Protocol Manager support from
  2541.        FTP Software, Inc.
  2542. SeeAlso: AH=3Fh"PC/TCP",AX=4402h"NDIS"
  2543.  
  2544. Format of FTPSOFT.DOS data:
  2545. Offset    Size    Description    (Table 0841)
  2546.  00h    WORD    (call) BA98h (if different, no data returned)
  2547.  02h    DWORD    -> NDIS common characteristics table
  2548.           (see #0780 at AX=4402h"NDIS")
  2549.  06h    DWORD    (call) -> new dispatch table (see #0782 at AX=4402h"NDIS")
  2550.  0Ah    DWORD    -> 28-byte buffer for ??? data
  2551.  0Eh    DWORD    ???
  2552.  12h    DWORD    -> FAR function to reset dispatch jump table to defaults
  2553.  16h    BYTE    ???
  2554. Note:    the addresses in the new dispatch table are copied into an internal
  2555.       jump table which may be reset by calling the function pointed at by
  2556.       offset 12h
  2557. --------n-214402-----------------------------
  2558. INT 21 U - PenDOS PENDEV.SYS - GET ENTRY POINTS
  2559.     AX = 4402h
  2560.     BX = file handle for device "$$PENDOS" or "$$PD_REG"
  2561.     CX = size of buffer (4 for $$PENDOS and a 4,8,12, or 16 for $$PD_REG)
  2562.     DS:DX -> buffer for entry point record (see #0842)
  2563. Return: CF clear if successful
  2564.         buffer filled
  2565.     CF set on error
  2566.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2567. Program: A limited version of PenDOS by Communication Intelligence Corporation,
  2568.       which provides pen capability to keyboard-based programs, is bundled
  2569.       with IBM DOS 6.1
  2570. SeeAlso: AX=4403h"PENDEV.SYS"
  2571.  
  2572. Format of PENDEV.SYS entry point record:
  2573. Offset    Size    Description    (Table 0842)
  2574.  00h    DWORD    -> array of jumps
  2575.  04h    WORD    offset of function to retrieve entry point (see #0843)
  2576.  06h  2 BYTEs    signature "Pe"
  2577.  08h    WORD    offset of function to set entry point (see #0844)
  2578.  0Ah  2 BYTEs    signature "nD"
  2579.  0Ch    WORD    offset of function to clear entry point (see #0845)
  2580.  0Eh    WORD    signature "OS"
  2581.  
  2582. (Table 0843)
  2583. Call PENDEV.SYS function to retrieve entry point with:
  2584.     AX = index of entry point (0-9)
  2585. Return: CF clear if successful
  2586.         DX:AX -> desired entry point
  2587.     CF set on error (AX out of range)
  2588.  
  2589. (Table 0844)
  2590. Call PENDEV.SYS function to set entry point with:
  2591.     AX = index of entry point (0-9)
  2592.     DX:SI -> new handler
  2593. Return: CF clear if successful
  2594.     CF set on error (AX out of range)
  2595.  
  2596. (Table 0845)
  2597. Call PENDEV.SYS function to clear entry point with:
  2598.     AX = index of entry point (0-9)
  2599. Return: CF clear if successful
  2600.     CF set on error (AX out of range)
  2601. Note:    resets the jump at the specified entry point to its default target,
  2602.       which simply returns
  2603. --------N-214402-----------------------------
  2604. INT 21 U - LAN Manager - TCPDRV.DOS - API
  2605.     AX = 4402h
  2606.     BX = file handle referencing device "TCPDRV$"
  2607.     CX = 0019h
  2608.     DS:DX -> buffer containing request block (see #0846)
  2609. Return: CF clear if successful
  2610.         buffer filled
  2611.     CF set on error
  2612.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2613. Program: TCPDRV.DOS is the low-level device driver supporting LAN Manager's
  2614.       TCP/IP protocol stack
  2615.  
  2616. Format of TCPDRV.DOS request block:
  2617. Offset    Size    Description    (Table 0846)
  2618.  00h    BYTE    (call) function number
  2619.         00h initialize ???
  2620.         06h get ???
  2621.         07h get ???
  2622.  01h    BYTE    (call) 00h
  2623.         (ret) error code if error, unchanged if successful
  2624.  02h    WORD    signature 4354h ('CT')
  2625. ---function 00h---
  2626.  04h    DWORD    (call) pointer to ??? FAR function
  2627.         function is called with ES:BX -> device driver request used to
  2628.           invoke this function
  2629.  08h  4 BYTEs    ???
  2630.  0Ch    DWORD    (call) pointer to ??? record, WORD at offset 22h is read
  2631.  10h    DWORD    (ret) -> ??? buffer if 0000h:0000h on call
  2632. ---function 06h---
  2633.  04h  4 BYTEs    ???
  2634.  08h    DWORD    (ret) pointer to ???
  2635. ---function 07h---
  2636.  04h    DWORD    (ret) pointer to ??? record
  2637. --------y-214402-----------------------------
  2638. INT 21 U - PC Tools 9 CPRLOW.EXE - GET CODE AND DATA ADDRESSES
  2639.     AX = 4402h
  2640.     BX = file handle referencing device "RECLOWLD"
  2641.     DS:DX -> buffer for address list (see #0847)
  2642.     CX ignored
  2643. Return: CF clear if successful
  2644.         buffer filled
  2645.     CF set on error
  2646.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2647.  
  2648. Format of CPRLOW address list:
  2649. Offset    Size    Description    (Table 0847)
  2650.  00h    WORD    segment of CPRLOW code
  2651.  02h    WORD    offset in code segment of ??? entry point
  2652.         (switches into protected mode)
  2653.  04h    WORD    offset in code segment of jump array (see #0848)
  2654.  06h    WORD    segment of copy of interrupt vector table at CPRLOW load time
  2655. Note:    neither the entry point nor the jump array is valid until after a
  2656.       CPR /LOAD, because CPR.EXE installs the code into CPRLOW at runtime.
  2657.  
  2658. Format of CPRLOW jump array:
  2659. Offset    Size    Description    (Table 0848)
  2660.  00h  3 BYTEs    initialize CPRLOW interrupt hooks
  2661.  03h  3 BYTEs    reset timers and enable CPR (hotkey enable)
  2662.  06h  3 BYTEs    disable CPR (hotkey disable)
  2663.  09h  3 BYTEs    clear ??? flag, hotkey disable, and ???
  2664.  0Ch  3 BYTEs    initialize delay loop counter (destroys AX,BX,CX,DX)
  2665.  0Fh  3 BYTEs    disable CPR completely (commandline /DISABLE)
  2666.  12h  3 BYTEs    enable ??? if CPR enabled by both cmdline and hotkey
  2667.  15h  3 BYTEs    enable CPR (commandline /ENABLE)
  2668. --------s-214402-----------------------------
  2669. INT 21 U - Creative Technology CTMMSYS.SYS v1.00.01 - API
  2670.     AX = 4402h
  2671.     BX = file handle for device "CTMMSYS$"
  2672.     CX = 0004h (size of data)
  2673.     DS:DX -> buffer for entry point (see #0849)
  2674. Return: CF clear if successful
  2675.         buffer updated
  2676.     CF set on error
  2677.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2678. Program: CTMMSYS.SYS is the Creative DOS Multimedia Architecture Integration
  2679.       driver
  2680. SeeAlso: AX=4402h"CTSB2",INT 80/BX=0000h"SBFM"
  2681.  
  2682. Format of CTMMSYS.SYS entry point record:
  2683. Offset    Size    Description    (Table 0849)
  2684.  00h    DWORD    (call) signature 4D6D7443h (ASCII "CtmM")
  2685.         (ret) pointer to CTMMSYS entry point (see #0850)
  2686. SeeAlso: #0851
  2687.  
  2688. (Table 0850)
  2689. Call CTMMSYS.SYS entry point with:
  2690.     AX = ???
  2691.     STACK:    WORD    ???
  2692.         WORD    ???
  2693.         WORD    ??? (0001h,0002h,0005h,0006h)
  2694.         WORD    ???
  2695.         DWORD    -> ???
  2696.         WORD    ???
  2697.         WORD    ???
  2698. Return: DX:AX = ??? or error code
  2699.         0000h:000Bh invalid value for ???
  2700.         0000h:000Fh API call already in progress
  2701. SeeAlso: #0849
  2702. --------s-214402-----------------------------
  2703. INT 21 U - Creative Technology CTSB2.SYS v1.01.01 - API
  2704.     AX = 4402h
  2705.     BX = file handle for device "CTSOUND0"
  2706.     CX = 0004h (size of data)
  2707.     DS:DX -> buffer for entry point (see #0851)
  2708. Return: CF clear if successful
  2709.         buffer updated
  2710.     CF set on error
  2711.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2712. Program: CTMMSYS.SYS is the Creative DOS Multimedia Architecture Integration
  2713.       driver
  2714. SeeAlso: AX=4402h"CTMMSYS",INT 80/BX=0000h"SBFM"
  2715.  
  2716. Format of CTSB2.SYS entry point record:
  2717. Offset    Size    Description    (Table 0851)
  2718.  00h    DWORD    (call) signature 4D6D7443h (ASCII "CtmM")
  2719.         (ret) pointer to CTSB2 entry point (see #0852)
  2720. SeeAlso: #0849
  2721.  
  2722. (Table 0852)
  2723. Call CTSB2.SYS entry point with:
  2724.     AX = ???
  2725.     STACK:    DWORD    -> ???
  2726.         WORD    function number
  2727.             (0100h,0200h,0300h,0400h,0500h,0600h,0701h)
  2728.         DWORD    -> ???
  2729.         WORD    ???
  2730.         WORD    ???
  2731. Return: DX:AX = ??? or error code
  2732.         0000h:0004h invalid subfunction???
  2733.         0000h:000Bh invalid value for ???
  2734.         0000h:000Fh API call already in progress
  2735. SeeAlso: #0851
  2736. --------m-214402-----------------------------
  2737. INT 21 U - Novell DOS 7 EMM386.EXE - GET STATE RECORD???
  2738.     AX = 4402h
  2739.     BX = file handle for device "EMMXXXX0"
  2740.     CX = 003Eh (size of state record)
  2741.     DS:DX -> buffer for state record (see #0853)
  2742. Return: CF clear if successful
  2743.         buffer filled (see #2852 at INT 67/AH=3Fh)
  2744.     CF set on error
  2745.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2746.  
  2747. Format of Novell DOS 7 EMM386.EXE state record:
  2748. Offset    Size    Description    (Table 0853)
  2749.  00h    WORD    signature EDC0h
  2750.  02h 60 BYTEs    ???
  2751. --------m-214402SF00-------------------------
  2752. INT 21 U - Memory Managers - GET API ENTRY POINT
  2753.     AX = 4402h subfn 00h
  2754.     BX = file handle for device "EMMXXXX0"
  2755.     CX = 0006h (size of buffer in bytes)
  2756.     DS:DX -> buffer for API entry point record (see #0854)
  2757.         first byte must be 00h on entry
  2758. Return: CF clear if successful
  2759.         buffer filled (see #2852 at INT 67/AH=3Fh)
  2760.     CF set on error
  2761.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2762. Notes:    this function is supported by Microsoft EMM386.EXE v4.45+ and
  2763.       CEMM v5.10+, and is intended for use by MS Windows as it starts up
  2764.     if no other program has hooked INT 67, an alternate installation
  2765.       check for CEMM is testing for the string
  2766.       "COMPAQ EXPANDED MEMORY MANAGER 386" at offset 14h in the INT 67
  2767.       handler's segment; if present, the word at offset 12h contains the
  2768.       offset of the API entry point
  2769. SeeAlso: AX=4402h/SF=01h,AX=4402h/SF=02h,AX=4402h"EMM386",INT 67/AH=3Fh
  2770.  
  2771. Format of memory manager API entry point record:
  2772. Offset    Size    Description    (Table 0854)
  2773.  00h    WORD    ??? (0022h for CEMM 5.11, 0025h for MS EMM386 v4.45)
  2774.  02h    DWORD    manager's private API entry point
  2775.         (see #0855,#2915 at INT 67/AX=FFA5h)
  2776.  
  2777. (Table 0855)
  2778. Call CEMM v5.10+ entry point with:
  2779.     AH = 00h get memory manager's state
  2780.         Return: AH = state
  2781.             bit 0: turned OFF
  2782.             bit 1: AUTO mode enabled
  2783.     AH = 01h set memory manager's state
  2784.         AL = new state (00h ON, 01h OFF, 02h AUTO)
  2785.         Return: CF clear if successful
  2786.             CF set on error
  2787.     AH = 02h Weitek coprocessor support
  2788.         AL = subfunction
  2789.         00h get Weitek support state
  2790.             Return: AL = status
  2791.                 bit 0: Weitek coprocessor is present
  2792.                 bit 1: Weitek support is enabled
  2793.         01h turn on Weitek support
  2794.         02h turn off Weitek support
  2795.         Return: CF clear if successful
  2796.             CF set on error
  2797.             AH = error code (01h invalid subfunc, 02h no Weitek)
  2798.     AH = 05h get statistics
  2799.         ???
  2800.     AH > 06h
  2801.         Return: CF set
  2802.             AH = 01h (invalid function)
  2803. Notes:    AH=03h,04h,06h are NOPs which return CF clear, presumably for backwards
  2804.       compatibility with earlier versions of CEMM
  2805.     in v5.11, AH=05h merely prints an error message (using INT 21/AH=09h)
  2806.       stating that a different version of CEMM is installed and it is
  2807.       therefore not possible to display the statistics
  2808. --------m-214402SF01-------------------------
  2809. INT 21 U - Memory Managers - GET EMM IMPORT STRUCTURE ADDRESS
  2810.     AX = 4402h subfn 01h
  2811.     BX = file handle for device "EMMXXXX0"
  2812.     CX = 0006h (size of buffer in bytes)
  2813.     DS:DX -> buffer for EMM import structure record (see #0856)
  2814.         first byte must be 01h on entry
  2815. Return: CF clear if successful
  2816.         buffer filled (see also #2852 at INT 67/AH=3Fh)
  2817.     CF set on error
  2818.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2819. Notes:    this function is supported by Microsoft EMM386.EXE v4.45+,
  2820.       QEMM-386 v6+, and CEMM v5.10+, and is intended for use by MS Windows
  2821.       as it starts up
  2822.     for QEMM-386, this call always returns an error if Windows3 support
  2823.       has been disabled with the NW3 switch
  2824. SeeAlso: AX=4402h/SF=00h,AX=4402h"EMM386",INT 2F/AX=D201h/BX=5145h
  2825. SeeAlso: INT 67/AH=3Fh
  2826.  
  2827. Format of EMM import structure record:
  2828. Offset    Size    Description    (Table 0856)
  2829.  00h    DWORD    physical address of EMM import structure (see #0857)
  2830.  04h    BYTE    EMM import structure major version
  2831.  05h    BYTE    EMM import structure minor version
  2832. Note:    version 1.00 contains only EMS information (Windows 3.0+)
  2833.     version 1.10 contains UMB/XMS/HMA/EMS information (Windows 3.1)
  2834.     version 1.11 is version 1.10 plus memory manager maker/product name
  2835. SeeAlso: #2892
  2836.  
  2837. Format of Global EMM Import record:
  2838. Offset    Size    Description    (Table 0857)
  2839.  00h    BYTE    bit flags
  2840.         bit 2: ???
  2841.         bit 3: free EMM386 virtual HMA only if hma_page_table_paddr!=0
  2842.         bit 4: no UMB???
  2843.  01h    BYTE    reserved (0)
  2844.  02h    WORD    size of structure in bytes
  2845.  04h    WORD    structure version
  2846.  06h    DWORD    reserved
  2847.  0Ah 384 BYTEs    64 EMS frame status records (see #0858), one per 16K of
  2848.           real-mode 1M address space
  2849. 18Ah    BYTE    ??? (must be at least 3*number_of_EMS_frames+4)
  2850. 18Bh    BYTE    number of UMB frame descriptors following
  2851. 18Ch 4N DWORDs    UMB frame descriptors
  2852.         each is 4 DWORDs giving physical page numbers for the four
  2853.           4K pages of a 16K EMS frame (00000000h if non-UMB page)
  2854. var    BYTE    number of EMS handle info records following
  2855.     16N BYTEs    EMS handle info records (see #0860)
  2856. ---version 1.10+ ---
  2857.     DWORD    realmode INT 67 vector (used by Windows to set breakpoints)
  2858.     DWORD    physical address of HMA page table values
  2859.     BYTE    number of free page entries following
  2860.      2N DWORDs    free page entries
  2861.         each is:
  2862.             DWORD    physical page number
  2863.             DWORD    number of consecutive physical pages
  2864.     BYTE    number of XMS handle info records following
  2865.         00h if memory manager does not emulate XMS or has real mode
  2866.           XMS code which can execute in the Windows environment
  2867.     12N BYTEs    XMS handle info records (see #0861)
  2868.     BYTE    number of free UMB info records following
  2869.      2N WORDs    free UMB info records
  2870.         each is:
  2871.             WORD    real mode start segment
  2872.             WORD    size in paragraphs
  2873. ---version 1.11---
  2874.      20 BYTEs    blank-padded maker name
  2875.      20 BYTEs    blank-padded product name
  2876.  
  2877. Format of EMS frame status record:
  2878. Offset    Size    Description    (Table 0858)
  2879.  00h    BYTE    frame type (see #0859)
  2880.  01h    BYTE    owner handle (00h/FFh = none) from frame including UMB
  2881.         index to UMB frame descriptors
  2882.  02h    WORD    logical page for frame, 7FFFh if none, FFFFh if non-EMS frame
  2883.  04h    BYTE    EMS physical page number (FFh for non-EMS = don't care???)
  2884.  05h    BYTE    flags for non-EMS frames (00h for EMS frame)
  2885.         bits 0,1 for first 4K, bits 2,3 for second 4K, etc:
  2886.           10: direct mapping (linear address = physical address)
  2887.           01: UMB mapping
  2888.  
  2889. Bitfields for EMS frame type:
  2890. Bit(s)    Description    (Table 0859)
  2891.  0    EMS frame
  2892.  1    (if EMS frame) in standard 64K page frame
  2893.  2    first 4K of frame is UMB
  2894.  3    second 4K of frame is UMB
  2895.  4    third 4K of frame is UMB
  2896.  5    last 4K of frame is UMB
  2897.  
  2898. Format of EMS handle info record:
  2899. Offset    Size    Description    (Table 0860)
  2900.  00h    BYTE    handle number (00h = system handle)
  2901.  01h    BYTE    flags
  2902.         bit 0: normal handle rather than system handle
  2903.         bit 2: ??? (set by some EMS managers)
  2904.  02h  8 BYTEs    EMS handle's name
  2905.  0Ah    WORD    number of 16K pages for handle
  2906.  0Ch    DWORD    physical address of page table entries forming page map
  2907. Note:    all values should be zero for the system handle if no large frame
  2908.       support is present
  2909.  
  2910. Format of XMS handle info record:
  2911. Offset    Size    Description    (Table 0861)
  2912.  00h    WORD    handle
  2913.  02h    WORD    flags
  2914.         bit 0: handle usable by Windows
  2915.             (already in use when Windows started if clear)
  2916.         bit 1: reserved (0)
  2917.  04h    DWORD    size in KB (may be zero, used only if flags bit 0 set)
  2918.  08h    DWORD    physical address (only if flags bit 0 set)
  2919. --------m-214402SF02-------------------------
  2920. INT 21 U - Memory Managers - GET MEMORY MANAGER VERSION
  2921.     AX = 4402h subfn 02h
  2922.     BX = file handle for device "EMMXXXX0"
  2923.     CX = 0002h (size of buffer in bytes)
  2924.     DS:DX -> buffer for memory manager version (see #0862)
  2925.         first byte must be 02h on entry
  2926. Return: CF clear if successful
  2927.         buffer filled
  2928.     CF set on error
  2929.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2930. Note:    this function is supported by Microsoft EMM386.EXE v4.45+ and
  2931.       CEMM v5.10+, and is intended for use by MS Windows as it starts up
  2932. SeeAlso: AX=4402h/SF=00h,AX=4402h"EMM386",INT 67/AH=3Fh
  2933.  
  2934. Format of memory manager version:
  2935. Offset    Size    Description    (Table 0862)
  2936.  00h    BYTE    major version
  2937.  01h    BYTE    minor version (binary)
  2938. --------m-214402-----------------------------
  2939. INT 21 U - Microsoft EMM386.EXE v4.45 - GET MEMORY MANAGER INFORMATION
  2940.     AX = 4402h
  2941.     BX = file handle for device "EMMXXXX0"
  2942.     CX = size of buffer in bytes (varies, see #0863)
  2943.     DS:DX -> buffer for returned data (see #0863)
  2944.         first byte must be set on entry to indicate desired data
  2945. Return: CF clear if successful
  2946.         buffer filled
  2947.     CF set on error
  2948.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2949. Notes:    an error is returned if the number of bytes to be read does not match
  2950.       the number of bytes returned for the specified data item
  2951.     this function is part of the interface which allows MS Windows to
  2952.       cooperate with memory managers
  2953. SeeAlso: AX=4402h/SF=00h,AX=4402h/SF=01h,AX=4402h/SF=02h,INT 67/AX=FFA5h
  2954.  
  2955. Format of EMM386.EXE data buffer:
  2956. Offset    Size    Description    (Table 0863)
  2957.  00h    BYTE    (call) function
  2958.         03h get ???
  2959.         04h get ???
  2960. ---function 03h---
  2961.  00h    WORD    ???
  2962.  02h    WORD    ???
  2963. ---function 04h---
  2964.  00h    WORD    segment of UMB containing EMM386 code/data
  2965.  02h    WORD    number of paragraphs of EMM386 code/data in UMB
  2966.  04h    WORD    ???
  2967. ----------214402-----------------------------
  2968. INT 21 U - IFSHLP.SYS - GET ENTRY POINT
  2969.     AX = 4402h
  2970.     BX = file handle for device "IFS$HLP$"
  2971.     CX = 0008h (size of buffer in bytes)
  2972.     DS:DX -> buffer for entry point record (see #0761 at AH=3Fh"IFSHLP")
  2973. Return: CF clear if successful
  2974.         buffer filled
  2975.     CF set on error
  2976.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2977. SeeAlso: AH=3Fh"IFSHLP"
  2978. --------D-214403-----------------------------
  2979. INT 21 - DOS 2+ - IOCTL - WRITE TO CHARACTER DEVICE CONTROL CHANNEL
  2980.     AX = 4403h
  2981.     BX = file handle referencing character device
  2982.     CX = number of bytes to write
  2983.     DS:DX -> data to write
  2984. Return: CF clear if successful
  2985.         AX = number of bytes actually written
  2986.     CF set on error
  2987.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  2988. Notes:    format of data is driver-specific
  2989.       (also see separate entries below for some specific cases)
  2990.     if the file handle refers to "4DOSSTAK", the 4DOS (v2.x-3.03)
  2991.       KEYSTACK.SYS driver will push the specified characters on the
  2992.       keyboard stack; similarly for "NDOSSTAK", the NDOS KEYSTACK.SYS
  2993.       driver will push the characters onto the keyboard stack
  2994. SeeAlso: AX=4400h,AX=4402h"DOS 2+",AX=4405h"DOS",INT 2F/AX=122Bh
  2995. SeeAlso: INT 2F/AX=D44Dh,INT 2F/AX=D44Fh
  2996. --------c-214403-----------------------------
  2997. INT 21 - SMARTDRV.SYS v3.x only - IOCTL - CACHE CONTROL
  2998.     AX = 4403h
  2999.     BX = handle for device "SMARTAAR"
  3000.     CX = number of bytes to write
  3001.     DS:DX -> SMARTDRV control block (see #0865)
  3002. Return: CF clear if successful
  3003.         AX = number of bytes actually written
  3004.         0000h if control block too small for given command
  3005.     CF set on error
  3006.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3007. Note:    NCache2 (from the Norton Utilities v8.0) attempts to support this
  3008.       interface, but does not do so correctly, often hanging the system;
  3009.       one should use the SmartDrive v4.x or NCache private interfaces
  3010.       (see INT 2F/AX=4A10h/BX=0000h,INT 2F/AX=FE00h/DI=4E55h)
  3011. SeeAlso: AX=4402h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  3012.  
  3013. (Table 0864)
  3014. Values for SMARTDRV function code:
  3015.  00h    flush cache
  3016.  01h    flush and discard cache
  3017.  02h    disable caching (flushes and discards cache first)
  3018.  03h    enable caching
  3019.  04h    control write caching
  3020.  05h    set flushing tick count
  3021.  06h    lock cache contents
  3022.  07h    unlock cache contents
  3023.  08h    set flush-on-reboot flag
  3024.  09h    unused
  3025.  0Ah    control full-track caching
  3026.  0Bh    reduce cache size
  3027.  0Ch    increase cache size
  3028.  0Dh    set INT 13 chain address
  3029.  
  3030. Format of SMARTDRV control block:
  3031. Offset    Size    Description    (Table 0865)
  3032.  00h    BYTE    function code (see #0864)
  3033. ---functions 00h-03h,06h,07h---
  3034.  no additional fields
  3035. ---function 04h---
  3036.  01h    BYTE    write caching control action
  3037.         00h turn off write-through
  3038.         01h turn on write-through
  3039.         02h turn off write buffering (also flushes cache)
  3040.         03h turn on write buffering (also flushes cache)
  3041. ---function 05h---
  3042.  01h    WORD    number of timer ticks between cache flushes
  3043. ---function 08h---
  3044.  01h    BYTE    new flush-on-reboot flag (00h off, 01h on)
  3045. ---function 0Ah---
  3046.  01h    BYTE    full-track writes are
  3047.         00h not cached
  3048.         01h cached
  3049. ---functions 0Bh,0Ch---
  3050.  01h    WORD    number of 16K pages by which to increase/reduce cache size
  3051. ---function 0Dh---
  3052.  01h    DWORD    new address to which to chain on INT 13
  3053. Note:    the previous address is not preserved
  3054. --------d-214403-----------------------------
  3055. INT 21 - CD-ROM device driver - IOCTL OUTPUT
  3056.     AX = 4403h
  3057.     BX = file handle referencing character device for CD-ROM driver
  3058.     CX = number of bytes to write
  3059.     DS:DX -> control block (see #0866)
  3060. Return: CF clear if successful
  3061.         AX = number of bytes actually written
  3062.     CF set on error
  3063.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3064. SeeAlso: AX=4402h"CD-ROM",INT 2F/AX=0802h
  3065.  
  3066. Format of CR-ROM control block:
  3067. Offset    Size    Description    (Table 0866)
  3068.  00h    BYTE    function code
  3069.         00h eject disk
  3070.         01h lock/unlock door
  3071.         02h reset drive
  3072.         03h control audio channel
  3073.         04h write device control string
  3074.         05h close tray
  3075. ---functions 00h,02h,05h---
  3076.  no further fields
  3077. ---function 01h---
  3078.  01h    BYTE    lock function
  3079.         00h unlock door
  3080.         01h lock door
  3081. ---function 03h---
  3082.  01h    BYTE    input channel (0-3) for output channel 0
  3083.  02h    BYTE    volume for output channel 0
  3084.  03h    BYTE    input channel (0-3) for output channel 1
  3085.  04h    BYTE    volume for output channel 1
  3086.  05h    BYTE    input channel (0-3) for output channel 2
  3087.  06h    BYTE    volume for output channel 2
  3088.  07h    BYTE    input channel (0-3) for output channel 3
  3089.  08h    BYTE    volume for output channel 3
  3090. Note:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  3091.       right prime; a volume of 00h is off
  3092. ---function 04h---
  3093.  01h  N BYTEs    bytes to send directly to the CD-ROM drive without
  3094.           interpretation
  3095. --------d-214403-----------------------------
  3096. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  3097.     AX = 4403h
  3098.     BX = handle for device "SCSITAPE"
  3099.     CX = number of bytes to write
  3100.     DS:DX -> SCSITAPE control block (see #0867)
  3101. Return: CF clear if successful
  3102.         AX = number of bytes actually written
  3103.     CF set on error
  3104.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3105. SeeAlso: AX=4405h"ST-01",INT 78/AH=10h
  3106.  
  3107. Format of SCSITAPE control block:
  3108. Offset    Size    Description    (Table 0867)
  3109.  00h    WORD    command type
  3110.         'F' Format (argument 1 = interleave, argument 2 = format type)
  3111.         'E' Erase
  3112.         'R' Rewind
  3113.         'L' Load
  3114.         'N' No Load
  3115.         'S' Space (argument 1 = count, argument 2 = type)
  3116.         'M' File Mark (argument 1 = count)
  3117.         'A' Reassign
  3118.  02h    WORD    argument 1
  3119.  04h    WORD    argument 2
  3120.  06h    WORD    segment of command buffer
  3121.  08h    WORD    offset of command buffer
  3122.  0Ah    WORD    length of command buffer
  3123. --------E-214403-----------------------------
  3124. INT 21 U - AI Architects - OS/x86??? - API
  3125.     AX = 4403h
  3126.     BX = handle for device "AIA_OS"
  3127.     CX = number of bytes to write (ignored)
  3128.     DS:DX -> 12-byte buffer (see #0868), first byte is command:
  3129.           81h installation check
  3130.           82h get API entry point
  3131.           84h uninstall
  3132. Return: CF clear if successful
  3133.         AX = number of bytes actually written
  3134.         DS:DX buffer filled
  3135.     CF set on error
  3136.         AX = error code (01h,05h,06h,0Ch,0Dh) (see #1020 at AH=59h)
  3137. Notes:    these functions are only available if the DOS extender was loaded as a
  3138.       device driver in CONFIG.SYS
  3139.     called by TKERNEL (a licensed version of AI Architects/Ergo OS/x86)
  3140. SeeAlso: INT 2F/AX=FBA1h/BX=0081h,INT 2F/AX=FBA1h/BX=0082h
  3141. Index:    installation check;OS/x86|entry point;OS/x86|uninstall;OS/x86
  3142.  
  3143. Format of buffer on return:
  3144. Offset    Size    Description    (Table 0868)
  3145.  00h  4 BYTEs    signature "IABH"
  3146. ---if function 81h---
  3147.  (no additional fields)
  3148. ---if function 82h---
  3149.  04h    DWORD    pointer to API entry point (see INT 2F/AX=FBA1h/BX=0082h)
  3150. ---if function 84h---
  3151.  04h    WORD    success indicator
  3152.  06h    WORD    segment of ???
  3153.  08h    WORD    segment of ??? memory block to free if nonzero
  3154.  0Ah    WORD    segment of ??? memory block to free if nonzero
  3155. --------V-214403-----------------------------
  3156. INT 21 - PGS1600.DEV - IOCTL - SET CONFIGURATION???
  3157.     AX = 4403h
  3158.     BX = file handle for device "PGS1600$"
  3159.     CX = 0018h (size of buffer)
  3160.     DS:DX -> configuration buffer (see #0826 at AX=4402h"PGS1600")
  3161. Return: CF clear if successful
  3162.         AX = number of bytes actually written
  3163.     CF set on error
  3164.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3165. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  3166.       display adapter, which provides a 1600x1200 monochrome display as
  3167.       well as one of two emulations, MDA or CGA.
  3168. SeeAlso: AX=4402h"PGS1600"
  3169. --------N-214403-----------------------------
  3170. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  3171.     AX = 4403h
  3172.     BX = file handle referencing device "$IPCUST"
  3173.     CX, DS:DX ignored
  3174. Return: CF clear if successful
  3175.         AX destroyed
  3176.     CF set on error
  3177.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3178. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  3179.       version 2.05.     If less than the entire data is read or written,
  3180.       the next read/write continues where the previous one ended; this
  3181.       call and AX=4402h both reset the location at which the next
  3182.       operation starts to zero
  3183.     v2.1+ uses a new configuration method, but allows the installation
  3184.       of IPCUST.SYS for backward compatibility with other software which
  3185.       must read the PC/TCP configuration
  3186. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4402h"IPCUST"
  3187. --------V-214403-----------------------------
  3188. INT 21 - Compaq AG1024.SYS - CPQ_MGES - IOCTL OUTPUT
  3189.     AX = 4403h
  3190.     BX = file handle referencing device "CPQ_MGES"
  3191.     DS:DX -> request packet (see #0869)
  3192.     CX ignored
  3193. Return: CF clear if successful
  3194.         AX destroyed
  3195.         data buffer filled (if applicable)
  3196.         first word of request packet set to number of bytes of data
  3197.           available (amount returned is smaller of this and requested
  3198.           amount)
  3199.     CF set on error
  3200.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3201. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  3202. SeeAlso: AX=4403h"RGDI"
  3203.  
  3204. Format of Compaq AG1024.SYS request packet:
  3205. Offset    Size    Description    (Table 0869)
  3206.  00h    WORD    function
  3207.         0000h get ??? (26h bytes)
  3208.         0001h get ??? (36h bytes)
  3209.         0002h set ??? (same as returned by function 0001h)
  3210.         0003h get ??? (6 bytes)
  3211.         0004h get ???
  3212.         0005h get ???
  3213.         0006h get ??? (10h bytes)
  3214.         0007h set ??? (same as returned by function 0006h)
  3215. ---functions 00h-03h,06h,07h---
  3216.  02h    WORD    size of data buffer
  3217.  04h    DWORD    -> buffer for function's data
  3218.  ---functions 04h,05h---
  3219.  02h    WORD    ???
  3220.  04h    WORD    size of data buffer
  3221.  06h    DWORD    -> buffer to receive data
  3222. --------V-214403-----------------------------
  3223. INT 21 - Compaq AG1024.SYS - RGDI - IOCTL OUTPUT
  3224.     AX = 4403h
  3225.     BX = file handle referencing device "$$$$RGDI"
  3226.     DS:DX -> request packet (see #0870)
  3227.     CX ignored
  3228. Return: CF clear if successful
  3229.         AX destroyed
  3230.         data buffer filled (if applicable)
  3231.         first word of request packet set to number of bytes of data
  3232.           available (amount returned is smaller of this and requested
  3233.           amount)
  3234.     CF set on error
  3235.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3236. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  3237. SeeAlso: AX=4402h"RGDI",AX=4403h"CPQ_MGES"
  3238.  
  3239. Format of Compaq AG1024.SYS request packet:
  3240. Offset    Size    Description    (Table 0870)
  3241.  00h    WORD    function
  3242.         0000h get entry points
  3243.         0001h get ???
  3244.  02h    DWORD    address of buffer for returned data
  3245. --------m-214403SF01-------------------------
  3246. INT 21 U - Qualitas 386MAX v6.01+ - TURN 386MAX OFF
  3247.     AX = 4403h subfn 01h
  3248.     BX = handle for device "386MAX$$"
  3249.     DS:DX -> BYTE 01h
  3250.     CX ignored
  3251. Return: DS:DX -> BYTE status (00h = successful)
  3252.     CF clear if successful
  3253.         AX destroyed
  3254.     CF set on error
  3255.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3256. Note:    this function will fail if any EMS or UMBs are in use
  3257. SeeAlso: AX=4403h/SF=02h,AX=4403h/SF=03h,AX=4403h/SF=05h
  3258. --------m-214403SF02-------------------------
  3259. INT 21 U - Qualitas 386MAX v6.01+ - TURN 386MAX ON
  3260.     AX = 4403h subfn 02h
  3261.     BX = handle for device "386MAX$$"
  3262.     DS:DX -> BYTE 02h
  3263.     CX ignored
  3264. Return: DS:DX -> BYTE status (00h = successful)
  3265.     CF clear if successful
  3266.         AX destroyed
  3267.     CF set on error
  3268.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3269. SeeAlso: AX=4403h/SF=01h,AX=4403h/SF=03h,AX=4403h/SF=05h
  3270. --------m-214403SF03-------------------------
  3271. INT 21 U - Qualitas 386MAX v6.01+ - SET STATE
  3272.     AX = 4403h subfn 03h
  3273.     BX = handle for device "386MAX$$"
  3274.     CX = number of bytes to copy (up to size of state buffer)
  3275.     DS:DX -> BYTE 03h followed by state buffer
  3276.           (see #0809 at AX=4402h"386MAX")
  3277. Return: CF clear if successful
  3278.         AX = number of bytes actually written
  3279.     CF set on error
  3280.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3281. Note:    the first byte of the buffer must be either 01h, 02h, or 03h
  3282.       (specifying the version of the state record) and the buffer must
  3283.       contain CX bytes AFTER the initial byte
  3284. SeeAlso: AX=4402h"386MAX"
  3285. --------m-214403SF05-------------------------
  3286. INT 21 U - Qualitas 386MAX v7.00+ - LIMIT AUTOMATIC ACTIVATION TO STD EMS CALLS
  3287.     AX = 4403h subfn 05h
  3288.     BX = handle for device "386MAX$$"
  3289.     DS:DX -> BYTE 05h
  3290.     CX ignored
  3291. Return: CF clear if successful
  3292.         AX destroyed
  3293.     CF set on error
  3294.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3295. Desc:    specifies that 386MAX will only shift from AUTO to ON mode on standard
  3296.       EMS calls INT 67/AH=40h-5Dh
  3297. SeeAlso: AX=4403h/SF=02h,AX=4403h/SF=03h,AX=4403h/SF=06h
  3298. --------m-214403SF06-------------------------
  3299. INT 21 U - Qualitas 386MAX v7.00+ - ALLOW AUTOMATIC ACTIVATION ON ANY INT 67
  3300.     AX = 4403h subfn 06h
  3301.     BX = handle for device "386MAX$$"
  3302.     DS:DX -> BYTE 06h
  3303.     CX ignored
  3304. Return: CF clear if successful
  3305.         AX destroyed
  3306.     CF set on error
  3307.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3308. Desc:    specified that 386MAX should shift from AUTO to ON mode on any INT 67
  3309.       call other than INT 67/AH=3Fh
  3310. SeeAlso: AX=4403h/SF=01h,AX=4403h/SF=03h,AX=4403h/SF=05h
  3311. --------n-214403-----------------------------
  3312. INT 21 U - PenDOS PENDEV.SYS - ???
  3313.     AX = 4403h
  3314.     BX = file handle for device "$$PENDOS" or "$$PD_REG"
  3315.     CX = size of buffer
  3316.     DS:DX -> buffer containing ???
  3317. Return: CF clear if successful
  3318.         buffer filled
  3319.     CF set on error
  3320.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3321. Program: A limited version of PenDOS by Communication Intelligence Corporation,
  3322.       which provides pen capability to keyboard-based programs, is bundled
  3323.       with IBM DOS 6.1
  3324. Note:    this call sets the WORD at offset 1Ah into the device driver request
  3325.       header used to call the driver to 0000h.
  3326. SeeAlso: AX=4402h"PENDEV.SYS"
  3327. --------D-214404-----------------------------
  3328. INT 21 - DOS 2+ - IOCTL - READ FROM BLOCK DEVICE CONTROL CHANNEL
  3329.     AX = 4404h
  3330.     BL = drive number (00h = default, 01h = A:, etc.)
  3331.     CX = number of bytes to read
  3332.     DS:DX -> buffer
  3333. Return: CF clear if successful
  3334.         AX = number of bytes actually read
  3335.     CF set on error
  3336.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3337. Note:    format of data is driver-specific
  3338. SeeAlso: AX=4402h"DOS 2+",AX=4405h"DOS",INT 2F/AX=122Bh
  3339. --------k-214404-----------------------------
  3340. INT 21 - Stacker - GET DEVICE DRIVER ADDRESS AND SET VOLUME NUMBER
  3341.     AX = 4404h
  3342.     BL = drive number (00h = default, 01h = A:, etc.)
  3343.     CX = 0004h
  3344.     DS:DX -> DWORD buffer to receive device driver address
  3345. Return: buffer filled with pointer into Stacker device driver (see #1886):
  3346.       driver + 19h if Stacker Anywhere controls this drive
  3347.       driver + 1Ah if Stacker controls this drive
  3348.       unchanged else
  3349. Notes:    in addition to returning the address of the Stacker device driver,
  3350.       this call also sets the volume number at offset 58h in the device
  3351.       driver (see #1886 at INT 25/AX=CDCDh)
  3352.     Stacker Anywhere does not link its built-in device driver into
  3353.       the standard device driver chain, but it can be found via CDS/DPB
  3354.     this call can be used as an installation check for all versions of
  3355.       Stacker and Stacker Anywhere to avoid the INT 25 call
  3356. SeeAlso: AX=4408h,AX=440Eh,AH=52h,INT 25/AX=CDCDh
  3357. --------k-214404-----------------------------
  3358. INT 21 - Stacker - GET STACVOL FILE SECTORS
  3359.     AX = 4404h
  3360.     BL = drive number (0 is current drive)
  3361.     CX = byte count (i.e., 200h = 1 sector)
  3362.     DS:DX -> buffer (see #0871)
  3363. Return: Data Buffer contains the number of sectors requested from the
  3364.       STACVOL physical file for the drive specified.
  3365.  
  3366. Format of Stacker buffer:
  3367. Offset    Size    Description    (Table 0871)
  3368.  00h    WORD    01CDh
  3369.  02h    WORD    sector count
  3370.  04h    DWORD    number of starting sector
  3371.  08h    DWORD    far pointer to Data Buffer
  3372. --------k-214404-----------------------------
  3373. INT 21 - DUBLDISK.SYS v2.6 - GET INFO
  3374.     AX = 4404h
  3375.     BL = drive number of DoubleDisk drive (00h = default, 01h = A:, etc.)
  3376.     CX = number of bytes (000Ah-0014h, call ignored otherwise)
  3377.     DS:DX -> data record (see #0872)
  3378. Return: CF clear if successful
  3379.         AX = number of bytes read
  3380.     CF set on error
  3381.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3382. Program: DUBLDISK.SYS is the device driver portion of DoubleDisk, a disk
  3383.       expander by Vertisoft Systems, Inc.
  3384. Note:    the installation check for v2.6 consists of scanning memory for the
  3385.       signature "FAT 2.6  byte:", which is immediately followed by a data
  3386.       table (see #0873)
  3387. BUG:    VOPT (a disk optimizer by Golden Bow Software) assumes that any driver
  3388.       which returns the "correct" number of bytes when the first word of
  3389.       the buffer for the data record contains the signature value 4444h is
  3390.       DoubleDisk; a workaround is for the non-DoubleDisk driver to return
  3391.       no data if the signature is present
  3392. SeeAlso: AX=440Dh"DOS"
  3393. Index:    installation check;DUBLDISK.SYS
  3394.  
  3395. Format of DUBLDISK data record:
  3396. Offset    Size    Description    (Table 0872)
  3397.  00h    WORD    (call) signature 4444h
  3398.  02h    BYTE    (call) function
  3399.             00h ???
  3400.             01h ???
  3401. ---function 00h---
  3402.  02h    BYTE    (ret) ???
  3403.  03h    BYTE    (ret) ???
  3404. ---function 01h---
  3405.  02h    WORD    (ret) 4444h
  3406.  04h    WORD    allocation unit size???
  3407.  06h    WORD    ???
  3408.  08h    WORD    ???
  3409.  0Ah    BYTE    ???
  3410.  
  3411. Format of DUBLDISK signature data table:
  3412. Offset    Size    Description    (Table 0873)
  3413.  00h  5 BYTEs    ???
  3414.  05h    BYTE    first drive number
  3415.  06h    BYTE    number of drives
  3416.  07h    ???
  3417. --------k-214404-----------------------------
  3418. INT 21 - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  3419.     AX = 4404h
  3420.     BL = drive number (00h = default, 01h = A:, etc)
  3421.     CX = 000Ah (size of DSPACKET structure)
  3422.     DS:DX -> DSPACKET structure (see #0874)
  3423. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  3424.         AX = number of bytes actually transferred
  3425.     CF set on error
  3426.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3427. SeeAlso: AX=4405h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  3428.  
  3429. Format of DoubleSpace DSPACKET structure:
  3430. Offset    Size    Description    (Table 0874)
  3431.  00h    WORD    signature 444Dh ("DM")
  3432.  02h    BYTE    command code
  3433.         46h ('F') flush internal caches
  3434.         49h ('I') flush and invalidate internal caches
  3435.  03h    WORD    result code
  3436.         (ret) 4F4Bh ("OK") if successful, else unchanged
  3437.  05h  5 BYTEs    padding
  3438. --------k-214404-----------------------------
  3439. INT 21 - DBLSPACE.BIN v6.2 - IOCTL - GET ??? FOR SPECIFIED DRIVE
  3440.     AX = 4404h
  3441.     BL = drive number (00h = default, 01h = A:, etc)
  3442.     CX = size of DSPACKET structure (ignored in DOS 6.2)
  3443.     DS:DX -> DSPACKET structure (see #0875)
  3444. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  3445.         AX = number of bytes actually transferred
  3446.     CF set on error
  3447.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3448. SeeAlso: AX=4405h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  3449.  
  3450. Format of DoubleSpace DSPACKET structure:
  3451. Offset    Size    Description    (Table 0875)
  3452.  00h    WORD    signature 444Dh ("DM")
  3453.  02h    BYTE    command code
  3454.         53h ('S') get ??? for specified drive
  3455.  03h    WORD    result code
  3456.         (ret) 4F4Bh ("OK") if successful, else unchanged
  3457.  05h    DWORD    (ret) pointer to 96-byte ??? data
  3458.  09h    DWORD    (ret) pointer to ??? data
  3459.  0Dh  3 BYTEs    reserved
  3460. --------k-214404-----------------------------
  3461. INT 21 U - DoubleTools v1.0 - GET ???
  3462.     AX = 4404h
  3463.     BL = drive number (00h = default, 01h = A:, etc)
  3464.     CX = 0006h
  3465.     DS:DX -> DoubleTools structure (see #0876)
  3466. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  3467.         AX = number of bytes actually transferred
  3468.     CF set on error
  3469.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3470. Note:    the Transporter device driver has the signature 55h 61h 50h 74h
  3471.       ("DaPt") twelve bytes after it beginning
  3472.  
  3473. Format of DoubleTools structure:
  3474. Offset    Size    Description    (Table 0876)
  3475.  00h    WORD    (call) signature 55h AAh
  3476.         (ret) signature 78h 70h ("xp")
  3477.  02h    WORD    (call) signature 52h 16h
  3478.         (ret) ???
  3479.  04h    WORD    (ret) segment of driver's DS (same as its PSP)
  3480. --------d-214404-----------------------------
  3481. INT 21 U - xDISK v3.31 - CONFIGURE
  3482.     AX = 4404h
  3483.     BL = drive number (00h = default, 01h = A:, etc)
  3484.     CX = 0047h (length of version string)
  3485.     DS:DX -> 79-byte buffer for version string and ???
  3486.     DS:0081h = commandline containing new switches for driver
  3487. Return: CF clear if successful
  3488.         AX = number of bytes actually transferred
  3489.     CF set on error
  3490.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3491. Program: xDISK is a shareware resizeable EMS RAMdisk by FM de Monasterio
  3492. SeeAlso: AX=4405h"xDISK",INT 2F/AH=DDh/BX=7844h"xDISK"
  3493. --------c-214404-----------------------------
  3494. INT 21 - COMBI-disk v1.13 - GET DATA RECORD
  3495.     AX = 4404h
  3496.     BL = drive number (00h = default, 01h = A:, etc)
  3497.     CX = 0032h (length of data packet)
  3498.     DS:DX -> buffer for data packet (see #0877)
  3499. Return: CF clear if successful
  3500.         AX = number of bytes actually transferred
  3501.     CF set on error
  3502.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3503. Program: COMBI-disk is a shareware combination cache and RAMdisk sharing a
  3504.       single pool of memory by Vadim V. Vlasov
  3505. Note:    the installation check consists of scanning the valid drives for one
  3506.       which returns a correctly-sized data packet with the proper
  3507.       signature in the first field
  3508. SeeAlso: AX=4405h"COMBI"
  3509. Index:    installation check;COMBI-disk
  3510.  
  3511. Format of COMBI-disk data packet:
  3512. Offset    Size    Description    (Table 0877)
  3513.  00h  6 BYTEs    ASCIZ signature "COMBI"
  3514.  06h    WORD    version (high byte = major, low = decimal minor version)
  3515.  08h    BYTE    current options
  3516.  09h    BYTE    sectors per allocation block
  3517.  0Ah    WORD    maximum buffer in KB
  3518.  0Ch    WORD    current buffer in KB (less than max if XMS memory being lent)
  3519.  0Eh    WORD    total number of allocation blocks
  3520.  10h    WORD    current number of allocation blocks
  3521.  12h    WORD    number of blocks being used by RAM disk
  3522.  14h    WORD    number of blocks being used by cache or unused
  3523.  16h    WORD    number of dirty cache blocks
  3524.  18h    WORD    number of blocks which could not be written out due to errors
  3525.  1Ah    WORD    total number of read requests
  3526.  1Ch    WORD    total number of sectors read
  3527.  1Eh    WORD    number of BIOS read requests (cache misses)
  3528.  20h    WORD    number of sectors read via BIOS (cache misses)
  3529.  22h    WORD    total number of write requests
  3530.  24h    WORD    total number of sectors written
  3531.  26h    WORD    number of BIOS write requests
  3532.  28h    WORD    number of sectors written via BIOS
  3533.  2Ah    WORD    number of RAM disk read requests
  3534.  2Ch    WORD    number of sectors read from RAM disk
  3535.  2Eh    WORD    number of RAM disk write requests
  3536.  30h    WORD    number of sectors written to RAM disk
  3537. --------d-214404-----------------------------
  3538. INT 21 - SFS v1.00 - GET CONFIGURATION INFORMATION
  3539.     AX = 4404h
  3540.     BL = drive number (00h = default, 01h = A:, etc)
  3541.     CX = 001Ah (length of data packet)
  3542.     DS:DX -> buffer for data packet (see #0878)
  3543. Return: CF clear if successful
  3544.         AX = number of bytes actually transferred
  3545.     CF set on error
  3546.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3547. Program: SFS (Secure FileSystem) is a shareware encrypting disk driver by
  3548.       Peter C. Gutmann
  3549. SeeAlso: AX=4405h"SFS"
  3550.  
  3551. Format of SFS data packet:
  3552. Offset    Size    Description    (Table 0878)
  3553.  00h  4 BYTEs    signature string "SFS1"
  3554.  04h    WORD    SFS unit number (0-based)
  3555.  06h    WORD    drive on which the SFS volume is mounted
  3556.  08h    DWORD    sector offset of logical volume from start of physical volume
  3557.         0 if logical volume = physical volume
  3558.  0Ch    WORD    flag: 00h = no disk mounted, 01h = disk mounted
  3559.  0Eh    WORD    flag: 00h read/write, 01h read-only
  3560.  10h    WORD    quick-unmount hotkey
  3561.         (high byte = shift state, low = scan code) (see #0005)
  3562.  12h    WORD    auto-unmount time in minutes, or 0000h if already expired, or
  3563.         FFFFh if not set
  3564.  14h    WORD    time in minutes remaining before auto-unmount
  3565.  16h    WORD    internal driver check code
  3566.         0000h no error
  3567.         0001h driver consistency check failed
  3568.         0002h unit consistency check failed
  3569.  18h    WORD    disk access mode
  3570.         0000h BIOS
  3571.         0001h IDE direct access
  3572.         0002h SCSI direct access
  3573. --------D-214405-----------------------------
  3574. INT 21 - DOS 2+ - IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL
  3575.     AX = 4405h
  3576.     BL = drive number (00h = default, 01h = A:, etc)
  3577.     CX = number of bytes to write
  3578.     DS:DX -> data to write
  3579. Return: CF clear if successful
  3580.         AX = number of bytes actually written
  3581.     CF set on error
  3582.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3583. Note:    format of data is driver-specific
  3584. SeeAlso: AX=4403h"DOS",AX=4404h"DOS",INT 2F/AX=122Bh
  3585. --------d-214405-----------------------------
  3586. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  3587.     AX = 4405h
  3588.     BX = drive number (00h = default, 01h = A:, etc)
  3589.     CX = number of bytes to write
  3590.     DS:DX -> SCSIDISK control block (see also #0867 at AX=4403h"ST-01")
  3591. Return: CF clear if successful
  3592.         AX = number of bytes actually written
  3593.     CF set on error
  3594.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3595. SeeAlso: AX=4403h"ST-01"
  3596. --------k-214405-----------------------------
  3597. INT 21 U - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  3598.     AX = 4405h
  3599.     BL = drive number (00h = default, 01h = A:, etc)
  3600.     CX = 000Ah (size of DSPACKET structure)
  3601.     DS:DX -> DSPACKET structure (see #0879)
  3602. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  3603.         AX = number of bytes actually transferred
  3604.     CF set on error
  3605.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3606. Note:    this call is identical to the documented AX=4404h
  3607. SeeAlso: AX=4404h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  3608.  
  3609. Format of DoubleSpace DSPACKET structure:
  3610. Offset    Size    Description    (Table 0879)
  3611.  00h    WORD    signature 444Dh ("DM")
  3612.  02h    BYTE    command code
  3613.         46h ('F') flush internal caches
  3614.         49h ('I') flush and invalidate internal caches
  3615.  03h    WORD    result code
  3616.         (ret) 4F4Bh ("OK") if successful, else unchanged
  3617.  05h  5 BYTEs    padding
  3618. --------d-214405-----------------------------
  3619. INT 21 U - xDISK v3.31 - ???
  3620.     AX = 4405h
  3621.     BL = drive number (00h = default, 01h = A:, etc)
  3622.     CX = number of bytes to write
  3623.     DS:DX -> buffer containing version string
  3624.     ???
  3625. Return: CF clear if successful
  3626.         AX = number of bytes actually transferred
  3627.     CF set on error
  3628.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3629. Program: xDISK is a shareware resizeable EMS RAMdisk by FM de Monasterio
  3630. SeeAlso: AX=4404h"xDISK",INT 2F/AH=DDh/BX=7844h"xDISK"
  3631. --------d-214405-----------------------------
  3632. INT 21 - COMBI-disk v1.13 - CONTROL COMBI-disk
  3633.     AX = 4405h
  3634.     BL = drive number (00h = default, 01h = A:, etc) for RAM disk
  3635.     CX = number of bytes to write
  3636.     DS:DX -> buffer containing command packet (see #0881)
  3637. Return: CF clear if successful
  3638.         AX = number of bytes actually transferred
  3639.     CF set on error
  3640.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3641. SeeAlso: AX=4404h"COMBI"
  3642.  
  3643. (Table 0880)
  3644. Values for COMBI-disk command code:
  3645.  80h    flush cache
  3646.  81h    change options byte
  3647.  82h    shrink memory
  3648.  83h    expand memory
  3649.  84h    get dirty block information
  3650.  85h    reset write errors
  3651.  86h    reset counters
  3652.  
  3653. Format of COMBI-disk command packet:
  3654. Offset    Size    Description    (Table 0881)
  3655.  00h    WORD    version
  3656.  02h    BYTE    command code (see #0880)
  3657. ---command code 80h---
  3658.  no additional fields
  3659. ---command code 81h---
  3660.  03h    BYTE    new options byte (see #0882)
  3661. ---command code 82h---
  3662.  03h    WORD    number of KB to release
  3663. ---command code 83h---
  3664.  03h    WORD    number of KB to expand
  3665. ---command code 84h---
  3666.  03h    DWORD    -> buffer for block info (see #0883)
  3667. ---command code 85h---
  3668.  03h    DWORD    block ID
  3669. ---command code 86h---
  3670.  03h    BYTE    which counters to reset
  3671.         bit 0: hard disk read counts
  3672.         bit 1: hard disk write counts
  3673.         bit 2: RAM disk read/write counts
  3674. Note:    multiple commands may be placed in a single packet by stringing
  3675.       together as many command/argument pairs as desired
  3676.  
  3677. Bitfields for COMBI-disk options byte:
  3678. Bit(s)    Description    (Table 0882)
  3679.  0    cache off
  3680.  1    cache frozen
  3681.  2    write caching enabled
  3682.  3    delayed writing disabled
  3683.  5    fix memory allocation (no XMS lending)
  3684.  6    no 'sector not found' error
  3685.  
  3686. Format of COMBI-disk block info:
  3687. Offset    Size    Description    (Table 0883)
  3688.  00h    DWORD    block ID
  3689.  04h    BYTE    bitmask of valid sectors in block
  3690.  05h    BYTE    bitmask of dirty sectors in block
  3691.  06h    BYTE    last error returned by BIOS
  3692.  07h    BYTE    number of errors
  3693. --------D-214405-----------------------------
  3694. INT 21 - SFS v1.00 - DRIVER CONTROL
  3695.     AX = 4405h
  3696.     BL = drive number (00h = default, 01h = A:, etc)
  3697.     CX = number of bytes to write
  3698.     DS:DX -> data to write (see #0885)
  3699. Return: CF clear if successful
  3700.         AX = number of bytes actually written
  3701.     CF set on error
  3702.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3703. Program: SFS (Secure FileSystem) is a shareware encrypting disk driver by
  3704.       Peter C. Gutmann
  3705. SeeAlso: AX=4404h"SFS"
  3706.  
  3707. (Table 0884)
  3708. Values for SFS control function:
  3709.  00h    "PACKET_SET_DISKINFO"     set disk parameters
  3710.  01h    "PACKET_SET_KEYINFO"     set keying information
  3711.  02h    "PACKET_SET_READONLY"     select read/write or read-only
  3712.  03h    "PACKET_SET_DRIVENO"     set drive number to mount
  3713.  04h    "PACKET_SET_MOUNTSTATUS" set mount status
  3714.  05h    "PACKET_SET_UNMOUNT"     set/clear quick-unmount hotkey
  3715.  06h    "PACKET_SET_TIMEOUT"     set/clear auto-unmount timeout
  3716.  
  3717. Format of SFS control data packet:
  3718. Offset    Size    Description    (Table 0885)
  3719.  00h    WORD    signature 4330h ('C0')
  3720.  02h    WORD    function (see #0884)
  3721. ---function 00h---
  3722.  04h    WORD    sector size in bytes
  3723.  06h    BYTE    sectors per cluster
  3724.  07h    WORD    number of boot sectors
  3725.  09h    BYTE    number of copies of FAT
  3726.  0Ah    WORD    size of root directory in entries
  3727.  0Ch    WORD    number of sectors on disk, 16-bit
  3728.  0Eh    BYTE    media descriptor byte
  3729.  0Fh    WORD    sectors per FAT
  3730.  11h    WORD    sectors per track
  3731.  13h    WORD    number of heads
  3732.  15h    DWORD    number of hidden sectors
  3733.  19h    DWORD    number of sectors on disk, 32-bit
  3734. ---function 01h---
  3735.  04h 20 BYTEs    master IV for encrypted disk
  3736.  18h 64 BYTEs    NDC/SHS keying information
  3737. ---function 02h---
  3738.  04h    WORD    read-only state: 00h read-only, 01h read/write
  3739. ---function 03h---
  3740.  04h    WORD    drive number (see #0886)
  3741.  06h    DWORD    sector offset of logical volume from start of physical volume
  3742.         0 if logical volume = physical volume
  3743. ---function 04h---
  3744.  04h    WORD    mount status (00h unmounted, 01h mounted)
  3745. ---function 05h---
  3746.  04h    WORD    hotkey (high byte = shift state, low byte = scan code or 00h)
  3747.         (see #0005)
  3748.         0000h to disable hotkey
  3749. ---function 06h---
  3750.  04h    WORD    timeout in minutes before automatic unmount
  3751.         0000h to disable auto-unmount
  3752. Notes:    the data for function 00h corresponds to a DOS BPB (see AH=53h)
  3753.     functions 00h, 01h, and 03h automatically unmount the encrypted drive
  3754.     unmounting a drive with function 04h also destroys the encryption
  3755.       information in the driver and forces all dirty buffers to be flushed
  3756.  
  3757. Bitfields for SFS drive number:
  3758. Bit(s)    Description    (Table 0886)
  3759.  15-12    drive access mode
  3760.     0000 BIOS access
  3761.     0001 direct IDE access
  3762.     0010 direct SCSI access
  3763. ---if BIOS access---
  3764.  11-8    unused (0)
  3765.  7-0    BIOS drive number
  3766. ---if IDE access---
  3767.  11-8    unused (0)
  3768.  7-0    IDE drive number
  3769. ---if SCSI access---
  3770.  11-8    SCSI host number
  3771.  7-4    SCSI target ID
  3772.  3-0    SCSI logical unit number
  3773. --------D-214406-----------------------------
  3774. INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
  3775.     AX = 4406h
  3776.     BX = file handle
  3777. Return: CF clear if successful
  3778.         AL = input status
  3779.         00h not ready (device) or at EOF (file)
  3780.         FFh ready
  3781.     CF set on error
  3782.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3783. Note:    files may not register as being at EOF if positioned there by AH=42h
  3784. SeeAlso: AX=4407h,INT 2F/AX=122Bh
  3785. --------D-214407-----------------------------
  3786. INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
  3787.     AX = 4407h
  3788.     BX = file handle
  3789. Return: CF clear if successful
  3790.         AL = input status
  3791.         00h not ready
  3792.         FFh ready
  3793.     CF set on error
  3794.         AX = error code (01h,05h,06h,0Dh) (see #1020 at AH=59h/BX=0000h)
  3795. Note:    for DOS 2+, files are always ready for output, even if the disk is
  3796.       full or no media is in the drive
  3797. SeeAlso: AX=4406h,INT 2F/AX=122Bh
  3798. --------D-214408-----------------------------
  3799. INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
  3800.     AX = 4408h
  3801.     BL = drive number (00h = default, 01h = A:, etc)
  3802. Return: CF clear if successful
  3803.         AX = media type (0000h removable, 0001h fixed)
  3804.     CF set on error
  3805.         AX = error code (01h,0Fh) (see #1020 at AH=59h/BX=0000h)
  3806. Note:    in addition to the normal operation, if Stacker is installed, this
  3807.       call also sets the volume number at offset 58h in the Stacker
  3808.       device driver (except under DR DOS 3.41-5.0, which do not pass
  3809.       through this call to the driver; use AX=440Eh instead)
  3810.       (see AX=4404h"Stacker",AX=440Eh,INT 25/AX=CDCDh)
  3811. SeeAlso: AX=4400h,AX=4404h"Stacker",AX=4409h,INT 2F/AX=122Bh
  3812. --------D-214409-----------------------------
  3813. INT 21 - DOS 3.1+ - IOCTL - CHECK IF BLOCK DEVICE REMOTE
  3814.     AX = 4409h
  3815.     BL = drive number (00h = default, 01h = A:, etc)
  3816. Return: CF clear if successful
  3817.         DX = device attribute word
  3818.         bit 15: drive is SUBSTituted
  3819.         bit 12: drive is remote
  3820.         bit  9: direct I/O not allowed
  3821.     CF set on error
  3822.         AX = error code (01h,0Fh) (see #1020 at AH=59h/BX=0000h)
  3823. Note:    on local drives, DX bits not listed above are the attribute word from
  3824.       the device driver header (see #0987 at AH=52h); for remote drives,
  3825.       the other bits appear to be undefined for DOS versions prior to 5.0
  3826.       (they are all cleared in DOS 5+)
  3827.     checking whether DX=0800h on return appears to be a fairly reliable
  3828.       method for detecting Microsoft's RAMDRIVE, though not for other
  3829.       ramdisks (there appears to be no simple yet foolproof method for
  3830.       detecting ramdisks, although the presence of only a single copy of
  3831.       the FAT and only a single head on non-removable devices is a fairly
  3832.       good indicator)
  3833. SeeAlso: AX=4400h,AX=4408h,AX=440Ah,INT 2F/AX=122Bh
  3834. --------D-21440A-----------------------------
  3835. INT 21 - DOS 3.1+ - IOCTL - CHECK IF HANDLE IS REMOTE
  3836.     AX = 440Ah
  3837.     BX = handle
  3838. Return: CF clear if successful
  3839.         DX = attribute word (as stored in SFT)
  3840.         bit 15: set if remote
  3841.         bit 14: date/time not set on close
  3842.     CF set on error
  3843.         AX = error code (01h,06h) (see #1020 at AH=59h/BX=0000h)
  3844. Notes:    if file is remote, Novell Advanced NetWare 2.0 returns the number of
  3845.       the file server on which the handle is located in CX
  3846.     DR DOS 3.41 and 5.0 clear all bits of DX except bit 15
  3847. SeeAlso: AX=4400h,AX=4409h,AH=52h,INT 2F/AX=122Bh
  3848. --------D-21440B-----------------------------
  3849. INT 21 - DOS 3.1+ - IOCTL - SET SHARING RETRY COUNT
  3850.     AX = 440Bh
  3851.     CX = pause between retries (default 1)
  3852.     DX = number of retries (default 3)
  3853. Return: CF clear if successful
  3854.     CF set on error
  3855.         AX = error code (01h) (see #1020 at AH=59h/BX=0000h)
  3856. Notes:    delay is dependent on processor speed (value in CX specifies number of
  3857.       64K-iteration empty loops to execute)
  3858.     if DX=0000h on entry, the retry count is left unchanged
  3859. SeeAlso: AH=52h,INT 2F/AX=1224h,INT 2F/AX=122Bh
  3860. --------D-21440C-----------------------------
  3861. INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
  3862.     AX = 440Ch
  3863.     BX = device handle
  3864.     CH = category code (see #0887)
  3865.     CL = function number (see #0888)
  3866.     DS:DX -> parameter block (see #0889,#0890,#0891,#0892,#0893,#0894)
  3867.     SI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  3868.     DI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  3869. Return: CF set on error
  3870.         AX = error code (see #1020 at AH=59h/BX=0000h)
  3871.     CF clear if successful
  3872.         DS:DX -> iteration count if CL=65h
  3873.         SI = returned value (European MS-DOS 4.0, OS/2 comp box)
  3874.         DI = returned value (European MS-DOS 4.0, OS/2 comp box)
  3875. Note:    DR DOS 3.41 and 5.0 return error code 16h on CL=45h,65h if the device
  3876.       does not support a retry counter
  3877. SeeAlso: AX=440Dh"DOS 3.2+",INT 2F/AX=0802h,INT 2F/AX=122Bh,INT 2F/AX=14FFh
  3878. SeeAlso: INT 2F/AX=1A01h
  3879.  
  3880. (Table 0887)
  3881. Values for IOCTL category code:
  3882.  00h    unknown (DOS 3.3+)
  3883.  01h    COMn: (DOS 3.3+)
  3884.  03h    CON (DOS 3.3+)
  3885.  05h    LPTn:
  3886.  9Eh    Media Access Control driver (STARLITE)
  3887.  00h-7Fh reserved for Microsoft
  3888.  80h-FFh reserved for OEM/user-defined
  3889.  
  3890. (Table 0888)
  3891. Values for generic character IOCTL function:
  3892.  00h    MAC driver Bind (STARLITE) (see #0889)
  3893.  45h    set iteration (retry) count (see #0890)
  3894.  4Ah    select code page (see #0891)
  3895.  4Ch    start code-page preparation (see #0892)
  3896.  4Dh    end code-page preparation (see #0893)
  3897.  5Fh    set display information (DOS 4.0+) (see #0894)
  3898.  65h    get iteration (retry) count
  3899.  6Ah    query selected code page (see #0891)
  3900.  6Bh    query prepare list (see #0895)
  3901.  7Fh    get display information (DOS 4.0+) (see #0894)
  3902. Note:    bit assignments for function code:
  3903.         bit 7: set to ignore if unsupported, clear to return error
  3904.         bit 6: set if passed to driver, clear if intercepted by DOS
  3905.         bit 5: set if queries data from device, clear if sends command
  3906.         bits 4-0: subfunction
  3907.  
  3908. Format of parameter block for function 00h:
  3909. Offset    Size    Description    (Table 0889)
  3910.  00h  8 BYTEs    ASCIZ signature "STARMAC"
  3911.  08h    WORD    version
  3912.  0Ah    WORD    flags
  3913.         bit 0: media requires connect or listen request before use
  3914.         bit 1: network is a LAN (broadcast/multicast supported)
  3915.         bit 2: point-to-point network
  3916.  0Ch    WORD    handle for use with MAC driver's private interface (filled in
  3917.         by MAC driver)
  3918.  0Eh    WORD    context
  3919.  10h    WORD    approximate speed in KB/sec (filled in by MAC driver)
  3920.  12h    WORD    approximate cost in cents per hour (filled in by MAC driver)
  3921.  14h    WORD    maximum packet size in bytes (filled in by MAC driver)
  3922.  16h    WORD    addressing format (filled in by MAC driver)
  3923.         0000h general addressing
  3924.         0001h Ethernet addressing
  3925.         0002h Token Ring addressing
  3926.         0003h Token Bus addressing
  3927.  18h    DWORD    Send entry point (filled in by MAC driver)
  3928.  1Ch    DWORD    RegisterEventHandler entry point (filled in by MAC driver)
  3929.  20h    DWORD    SetPacketFilter entry point (filled in by MAC driver)
  3930.  24h    DWORD    UnBind entry point (filled in by MAC driver)
  3931.  
  3932. Format of parameter block for function 45h:
  3933. Offset    Size    Description    (Table 0890)
  3934.  00h    WORD    number of times output is attempted before driver assumes
  3935.           device is busy
  3936.  
  3937. Format of parameter block for functions 4Ah and 6Ah:
  3938. Offset    Size    Description    (Table 0891)
  3939.  00h    WORD    length of data
  3940.  02h    WORD    code page ID (see #1099 at INT 21/AX=6602h)
  3941.  04h 2N BYTEs    DCBS (double byte character set) lead byte range
  3942.           start/end for each of N ranges (DOS 4.0)
  3943.     WORD    0000h  end of data (DOS 4.0)
  3944.  
  3945. Format of parameter block for function 4Ch:
  3946. Offset    Size    Description    (Table 0892)
  3947.  00h    WORD    flags
  3948.         DISPLAY.SYS = 0000h
  3949.         PRINTER.SYS bit 0 clear to prepare downloaded font, set to
  3950.             prepare cartridge selection
  3951.  02h    WORD    length of remainder of parameter block
  3952.  04h    WORD    number of code pages following
  3953.  06h  N WORDs    code page 1,...,N
  3954.  
  3955. Format of parameter block for function 4Dh:
  3956. Offset    Size    Description    (Table 0893)
  3957.  00h    WORD    length of data
  3958.  02h    WORD    code page ID (see #1099 at INT 21/AX=6602h)
  3959.  
  3960. Format of parameter block for functions 5Fh and 7Fh:
  3961. Offset    Size    Description    (Table 0894)
  3962.  00h    BYTE    level (0 for DOS 4.x-6.0)
  3963.  01h    BYTE    reserved (0)
  3964.  02h    WORD    length of following data (14)
  3965.  04h    WORD    control flags
  3966.         bit 0 set for blink, clear for intensity
  3967.         bits 1-15 reserved
  3968.  06h    BYTE    mode type (1=text, 2=graphics)
  3969.  07h    BYTE    reserved (0)
  3970.  08h    WORD    colors
  3971.         0000h = monochrome
  3972.         else N bits per pixel
  3973.  0Ah    WORD    pixel columns
  3974.  0Ch    WORD    pixel rows
  3975.  0Eh    WORD    character columns
  3976.  10h    WORD    character rows
  3977.  
  3978. Format of parameter block for function 6Bh:
  3979. Offset    Size    Description    (Table 0895)
  3980.  00h    WORD    length of following data
  3981.  02h    WORD    number of hardware code pages
  3982.  04h  N WORDs    hardware code pages 1,...,N
  3983.     WORD    number of prepared code pages
  3984.       N WORDs    prepared code pages 1,...,N
  3985. --------d-21440C-----------------------------
  3986. INT 21 - Greg Shenaut ASPITAPE.SYS - INTERFACE
  3987.     AX = 440Ch
  3988.     BX = device handle
  3989.     CH = category code
  3990.         07h tape (ASPITAPE.SYS)
  3991.     CL = function
  3992.         01h "mtop" - perform tape operation
  3993.         02h "mtget" - get tape status
  3994.         03h ignore end-of-tape errors
  3995.         04h enable end-of-tape errors
  3996.     DS:DX -> parameter block (see #0896,#0897)
  3997. Return: CF set on error
  3998.         AX = error code (see #1020 at AH=59h/BX=0000h)
  3999.     CF clear if successful
  4000.         DS:DX -> data block
  4001. Notes:    This device driver is a simple DOS interface to the Adaptec Advanced
  4002.       SCSI Programming Interface (ASPI).  It provides the following device
  4003.       names as access to the SCSI tape, 'RMTx' (rewind on close) and
  4004.       'NRMTx' (NO rewind on close) where x can go from 0 to 3.  There may
  4005.       also be the following names 'MTx' and 'NMTx' which default to 1024
  4006.       byte blocks.    The names may also have a '$' appended to try and make
  4007.       them unique from file names of 'RMT0' etc.
  4008.     once opend these devices must be put into RAW mode
  4009. SeeAlso: AX=4402h"ASPI"
  4010.  
  4011. Format of ASPITAPE.SYS mtop parameter block:
  4012. Offset    Size    Description    (Table 0896)
  4013.  00h    WORD    operation code
  4014.         00h "MTWEOF" - write an end-of-file record
  4015.         01h "MTFSF" - forward space file
  4016.         02h "MTBSF" - backward space file
  4017.         03h "MTFSR" - forward space record
  4018.         04h "MTBSR" - backward space record
  4019.         05h "MTREW" - rewind
  4020.         06h "MTOFFL" - rewind and unload
  4021.         07h "MTNOP" - perform TEST UNIT READY
  4022.  02h    DWORD    repetition count
  4023.  
  4024. Format of ASPITAPE.SYS mtget parameter block:
  4025. Offset    Size    Description    (Table 0897)
  4026.  00h    BYTE    ASPI host ID
  4027.  01h    BYTE    SCSI target ID
  4028.  02h    BYTE    SCSI logical unit number
  4029.  03h    BYTE    device parameters
  4030.         bit 0: drive must use fixed-block read and write
  4031.         bit 7: drive is an ASPI device
  4032.  04h    BYTE    current device state (see #0898)
  4033.  05h    BYTE    unit number within driver
  4034.  06h    WORD    fixed block blocksize
  4035.  08h    BYTE    last SCSI status
  4036.  09h    BYTE    last SCSI sense key
  4037.  0Ah    WORD    last SCSI opcode (packed) (see #0899)
  4038.  0Ch    WORD    residual bytes from SCSI opcode
  4039.  
  4040. Bitfields for ASPITAPE.SYS current device state:
  4041. Bit(s)    Description    (Table 0898)
  4042.  0    device currently opened in buffered mode
  4043.  1    drive currently opened in nonbuffered mode
  4044.  2    rewind drive on last close
  4045.  3    drive has been written on
  4046.  4    drive has been read from
  4047.  5    next read will return 0 bytes
  4048.  6    EOM will resemble EOF
  4049.  7    drive may be busy rewinding
  4050.  
  4051. Bitfields for SCSI opcode:
  4052. Bit(s)    Description    (Table 0899)
  4053.  0-7    SCSI operation (SCSI packet byte 0)
  4054.  8-10    SCSI flags (SCSI packet byte 1)
  4055.  11-12    ASPI "Direction Bits" (ASPI SRB byte 3)
  4056. --------D-21440D-----------------------------
  4057. INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
  4058.     AX = 440Dh
  4059.     BL = drive number (00h=default,01h=A:,etc)
  4060.     CH = category code (see #0900)
  4061.     CL = minor code (function) (see #0901)
  4062.     DS:DX -> (DOS) parameter block (see #0902,#0904,#0905,#0906,#0907)
  4063.     SI:DI -> (OS/2 comp box) parameter block (see #0908,#0910,#0911,#0914)
  4064. Return: CF set on error
  4065.         AX = error code (01h,02h,etc.) (see #1020 at AH=59h/BX=0000h)
  4066.     CF clear if successful
  4067.         DS:DX -> data block if CL=60h or CL=61h
  4068. Notes:    DOS 4.01 seems to ignore the high byte of the number of directory
  4069.       entries in the BPB for diskettes.
  4070.     functions 46h and 66h undocumented in DOS 4.x, documented for DOS 5+
  4071.     the DUBLDISK.SYS v2.6 driver only supports minor codes 60h and 67h
  4072.     DR DOS 3.41-6.0 only support minor codes 40h-42h and 60h-62h; all
  4073.       other minor codes return error code 16h
  4074.     some PCMCIA calls reportedly appear to be dangerous for MS-DOS versions
  4075.       prior to 5.0
  4076.     minor code 60h normally produces no I/O except with AutoMount=1 for
  4077.       DBLSPACE/DRVSPACE
  4078. SeeAlso: AX=440Ch,AX=440Dh/CX=084Ah,AX=440Dh/CX=0871h,AH=69h,INT 2F/AX=0802h
  4079. SeeAlso: INT 2F/AX=122Bh
  4080.  
  4081. (Table 0900)
  4082. Values for block device IOCTL category code:
  4083.  08h    disk drive
  4084.  00h-7Fh reserved for Microsoft
  4085.  80h-FFh reserved for OEM/user-defined
  4086.  
  4087. (Table 0901)
  4088. Values for generic block IOCTL minor code:
  4089.  00h    (OS/2)    \ used to lock/unlock a drive
  4090.  01h    (OS/2)    /
  4091.  40h    set device parameters (see #0902)
  4092.  41h    write logical device track (see #0904)
  4093.  42h    format and verify logical device track (see #0905)
  4094.  46h    (DOS 4.0+) set volume serial number (see #0907,AH=69h)
  4095.  47h    (DOS 4.0+) set access flag (see #0908)
  4096.  48h    (Enh. Disk Drive Spec) set media lock state (see #0909,INT 13/AH=45h)
  4097.  49h    (Enh. Disk Drive Spec) eject media in drive (see INT 13/AH=49h)
  4098.     no parameter block required
  4099.  4Ah    (MS-DOS 7.0) lock logical volume (see AX=440Dh/CX=084Ah)
  4100.  4Bh    (MS-DOS 7.0) lock physical volume (see AX=440Dh/CX=084Bh)
  4101.  50h    (PCMCIA) attribute memory write
  4102.  51h    (PCMCIA) common memory write
  4103.  52h    (PCMCIA) force media change (DOS 5+ ???) (see #0910)
  4104.  53h    (PCMCIA) erase drive
  4105.  54h    (PCMCIA) erase media
  4106.  56h    (PCMCIA) set erase status callback
  4107.  57h    (PCMCIA) append Card Information Structure (CIS) tuple
  4108.  58h    (PCMCIA) erase CIS tuples
  4109.  60h    get device parameters (see #0902)
  4110.  61h    read logical device track (see #0904)
  4111.  62h    verify logical device track (see #0906)
  4112.  66h    (DOS 4.0+) get volume serial number (see #0907,AH=69h)
  4113.  67h    (DOS 4.0+) get access flag (see #0908)
  4114.  68h    (DOS 5.0+) sense media type (see #0911)
  4115.  6Ah    (MS-DOS 7.0) unlock logical volume (see AX=440Dh/CX=086Ah)
  4116.     no parameter block required
  4117.  6Bh    (MS-DOS 7.0) unlock physical volume (see AX=440Dh/CX=086Bh)
  4118.     no parameter block required
  4119.  6Ch    (MS-DOS 7.0) get lock flag (see AX=440Dh/CX=086Ch)
  4120.     no parameter block required
  4121.  6Dh    (MS-DOS 7.0) enumerate open files (see AX=440Dh/CX=086Dh)
  4122.  6Eh    (MS-DOS 7.0) find swap file (see AX=440Dh/CX=086Eh)
  4123.  6Fh    (MS-DOS 7.0) get drive map information (see #0912)
  4124.  70h    (PCMCIA) attribute memory read
  4125.  70h    (MS-DOS 7.0) get current lock state (see AX=440Dh/CX=0870h)
  4126.     no parameter block required
  4127.  71h    (MS-DOS 7.0) get first cluster (see AX=440Dh/CX=0871h)
  4128.  73h    (PCMCIA) get memory media information (DOS 5+ ???) (see #0914)
  4129.  76h    (PCMCIA) get erase status callback
  4130.  77h    (PCMCIA) get first Card Information Structure (CIS) tuple
  4131.  78h    (PCMCIA) get next CIS tuple
  4132.  7Fh    (PCMCIA) get ??? information (see #0915,#0916)
  4133.  
  4134. Format of parameter block for functions 40h, 60h:
  4135. Offset    Size    Description    (Table 0902)
  4136.  00h    BYTE    special functions
  4137.         bit 0 set if function to use current BPB, clear if Device
  4138.               BIOS Parameter Block field contains new default BPB
  4139.         bit 1 set if function to use track layout fields only
  4140.             must be clear if CL=60h
  4141.         bit 2 set if all sectors in track same size (should be set)
  4142.         bits 3-7 reserved (MS-DOS, Novell DOS 7)
  4143.         bit 5: skip head settling time (WinDOS 2.11)
  4144.         bit 6: format access flag (WinDOS 2.11)
  4145.  01h    BYTE    device type (see #0903)
  4146.  02h    WORD    device attributes
  4147.         bit 0 set if nonremovable medium
  4148.         bit 1 set if door lock ("changeline") supported
  4149.         bits 2-15 reserved
  4150.  04h    WORD    number of cylinders
  4151.  06h    BYTE    media type
  4152.         for 1.2M drive
  4153.             00h 1.2M disk (default)
  4154.             01h 320K/360K disk
  4155.         F8h for DUBLDISK.SYS v2.6 expanded drives
  4156.         always 00h for other drive types
  4157.  07h 31 BYTEs    device BPB (see #1004 at AH=53h), bytes after BPB offset 1Eh
  4158.           omitted; final six bytes only transferred on function 40h
  4159.           with BYTE 00h bit 0 set for MS-DOS 5.0
  4160. ---function 40h only---
  4161.  26h    WORD    number of sectors per track (start of track layout field)
  4162.         (maximum 63)
  4163.  28h  N word pairs: number,size of each sector in track
  4164.  
  4165. (Table 0903)
  4166. Values for device type:
  4167.  00h    320K/360K disk
  4168.  01h    1.2M disk
  4169.  02h    720K disk
  4170.  03h    single-density 8-inch disk
  4171.  04h    double-density 8-inch disk
  4172.  05h    fixed disk
  4173.  06h    tape drive
  4174.  07h    (DOS 3.3+) other type of block device, normally 1.44M floppy
  4175.  08h    read/write optical disk
  4176.  09h    (DOS 5+) 2.88M floppy
  4177.  
  4178. Format of parameter block for functions 41h, 61h:
  4179. Offset    Size    Description    (Table 0904)
  4180.  00h    BYTE    special functions (reserved, must be zero)
  4181.  01h    WORD    number of disk head
  4182.  03h    WORD    number of disk cylinder
  4183.  05h    WORD    number of first sector to read/write
  4184.  07h    WORD    number of sectors
  4185.  09h    DWORD    transfer address
  4186. Note:    under Windows95, a volume must be locked (see AX=440Dh/CX=084Bh) in
  4187.       order to perform direct accesses such as track reads and writes
  4188.       with this IOCTL function
  4189.  
  4190. Format of parameter block for function 42h:
  4191. Offset    Size    Description    (Table 0905)
  4192.  00h    BYTE    reserved, must be zero (DOS <3.2)
  4193.           bit 0=0: format/verify track
  4194.             1: format status call (DOS 3.2+), don't actually format
  4195.           bit 1: format multiple tracks, require additional WORD
  4196.               (hard disks only)
  4197.           bits 2-7 reserved, must be zero
  4198.         value on return (DOS 3.3+):
  4199.           00h    specified tracks, sectors/track supported by BIOS
  4200.           01h    function not supported by BIOS
  4201.           02h    specified tracks, sectors/track not allowed for drive
  4202.           03h    no disk in drive
  4203.  01h    WORD    number of disk head
  4204.  03h    WORD    number of disk cylinder
  4205. ---BYTE 00h bit 1 set---
  4206.  05h    WORD    number of tracks to format
  4207.  
  4208. Format of parameter block for function 62h:
  4209. Offset    Size    Description    (Table 0906)
  4210.  00h    BYTE    reserved, must be zero (DOS <3.2)
  4211.           bit 0=0: verify single track
  4212.             1: verify multiple tracks
  4213.           bits 1-7 reserved, must be zero
  4214.         value on return (DOS 3.3+):
  4215.           00h    specified tracks, sectors/track supported by BIOS
  4216.           01h    function not supported by BIOS
  4217.           02h    specified tracks, sectors/track not allowed for drive
  4218.           03h    no disk in drive
  4219.  01h    WORD    number of disk head
  4220.  03h    WORD    number of disk cylinder
  4221.  05h    WORD    number of tracks to verify (equivalent to 255 or fewer sectors)
  4222.  
  4223. Format of parameter block for functions 46h, 66h:
  4224. Offset    Size    Description    (Table 0907)
  4225.  00h    WORD    (call) info level (should be 0000h)
  4226.  02h    DWORD    disk serial number (binary)
  4227.  06h 11 BYTEs    volume label or "NO NAME    "
  4228.  11h  8 BYTEs    filesystem type "FAT12     " or "FAT16   "
  4229.           (generally CL=66h only, but MS-DOS 5.0 will write the
  4230.           given filesystem type to the disk)
  4231.  
  4232. Format of parameter block for functions 47h, 67h:
  4233. Offset    Size    Description    (Table 0908)
  4234.  00h    BYTE    special-function field (must be zero)
  4235.  01h    BYTE    disk-access flag, nonzero if access allowed by driver
  4236.  
  4237. Format of parameter block for function 48h:
  4238. Offset    Size    Description    (Table 0909)
  4239.  00h    BYTE    (call) locking operation
  4240.         00h lock media in drive
  4241.         01h unlock media
  4242.         02h get locking status
  4243.  01h    BYTE    (ret) drive's lock status (number of pending locks on drive)
  4244. Note:    also supported by MS-DOS 7.0
  4245.  
  4246. Format of parameter block for function 52h:
  4247.  00h    BYTE    (call) unused???    (Table 0910)
  4248.         (ret) 00h if flash/ATA drive but no card inserted
  4249.             unchanged otherwise
  4250. Notes:    the absense of a flash card should be tested by checking the DOS error
  4251.       code rather than the returned byte
  4252.     the parameter byte is cleared to 00h erroneously by the Award
  4253.       PCDISK.EXE v1.02c PCMCIA/ATA driver if no ATA card is inserted
  4254.       (bug corrected in PCDISK.EXE v1.02h and later)
  4255.     not supported by the SystemSoft ATADRV.EXE and the Phoenix PCMATA.SYS
  4256.       PCMCIA/ATA drivers
  4257.  
  4258. Format of parameter block for function 68h:
  4259. Offset    Size    Description    (Table 0911)
  4260.  00h    BYTE    01h for default media type, 00h for any other media type
  4261.         (see also INT 13/AH=20h"Compaq")
  4262.  01h    BYTE    02h for 720K, 07h for 1.44M, 09h for 2.88M
  4263.  
  4264. Format of parameter block for function 6Fh:
  4265. Offset    Size    Description    (Table 0912)
  4266.  00h    BYTE    (call) length of this buffer (in bytes)
  4267.  01h    BYTE    (ret) number of bytes in parameter block actually used
  4268.  02h    BYTE    (ret) drive flags (see #0913)
  4269.  03h    BYTE    (ret) physical drive number
  4270.         00h-7Fh floppy
  4271.         80h-FEh hard
  4272.         FFh no physical drive
  4273.  04h    DWORD    (ret) bitmap of logical drives associated with physical drive
  4274.         bit 0 = drive A:, etc.
  4275.  08h    QWORD    (ret) relative block address of partition start
  4276.  
  4277. Bitfields for Get Drive Map Information drive flags:
  4278. Bit(s)    Description    (Table 0913)
  4279.  0    protected-mode driver for logical drive
  4280.  1    protected-mode driver in use for physical drive corresponding to the
  4281.       logical drive
  4282.  2    drive available only in protected mode
  4283.  3    protected-mode drive supports media ejection
  4284.  4    drive issues media insertion and removal notifications
  4285. SeeAlso: #0912
  4286.  
  4287. Format of parameter block for function 73h:
  4288. Offset    Size    Description    (Table 0914)
  4289.  00h    BYTE    ???
  4290.         00h ATA card inserted ???
  4291.         80h ATA card not inserted ???
  4292.  01h    BYTE    length of parameter block ???
  4293.         apparently always 40h
  4294.  02h    BYTE    ???
  4295.         00h ATA card not inserted ???
  4296.         0Dh ATA card inserted ???
  4297.  03h  2 BYTEs    ??? (apparently always 00h)
  4298.  05h    BYTE    drive number (0=first) ???
  4299.  06h    BYTE    total number of drives ???
  4300.  07h    BYTE    ???
  4301.         00h ATA card not inserted ???
  4302.         01h ATA card inserted ???
  4303.  08h 17 BYTEs    ???
  4304.  19h    BYTE    ???
  4305.         00h ATA card not inserted ???
  4306.         01h ATA card inserted ???
  4307.  1Ah    BYTE    ??? (apparently always 01h)
  4308.  1Bh    BYTE    ???
  4309.         00h ATA card not inserted ???
  4310.         01h ATA card inserted ???
  4311.  1Ch  2 BYTEs    ??? (apparently always 0015h)
  4312.  1Eh  2 BYTEs    ???
  4313.  20h  2 BYTEs    ??? (apparently always 0110h)
  4314.  22h 15 BYTEs    ???
  4315.  31h  2 BYTEs    ??? (apparently always 7000h)
  4316.  33h 11 BYTEs    driver signature
  4317.         "AWARD PDISK" for Award PCDISK.EXE PCMCIA/ATA driver
  4318.         "MS-BIOS    " for HP 200LX generic ATA driver
  4319.  3Eh  2 BYTEs    ???
  4320. Notes:    parameter structure possibly depends on driver
  4321.     this function is not supported by the SystemSoft ATADRV.EXE and the
  4322.       Phoenix PCMATA.SYS PCMCIA/ATA drivers
  4323.  
  4324. Format of parameter block for function 7Fh for SystemSoft ATADRV.EXE:
  4325. Offset    Size    Description    (Table 0915)
  4326.  00h    DWORD    -> unknown location within driver
  4327. Note:    function supported by the SystemSoft ATADRV.EXE PCMCIA/ATA driver
  4328.       but not by the Award PCDISK.EXE PCMCIA/ATA driver
  4329. SeeAlso: #0916
  4330.  
  4331. Format of parameter block for function 7Fh for Phoenix PCMATA.SYS:
  4332. Offset    Size    Description    (Table 0916)
  4333.  00h  8 BYTEs    ???
  4334. Note:    this function supported by the Phoenix PCMATA.SYS PCMCIA/ATA driver
  4335.       but not by the Award PCDISK.EXE PCMCIA/ATA driver
  4336. SeeAlso: #0915
  4337. --------D-21440DCX084A-----------------------
  4338. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - LOCK LOGICAL VOLUME
  4339.     AX = 440Dh
  4340.     CX = 084Ah (category code 08h, minor code 4Ah)
  4341.     BL = drive number (00h=default,01h=A:,etc)
  4342.     BH = lock level (00h-03h)
  4343.     DX = drive permissions (see #0917) for Level 1 lock or second
  4344.         Level 0 lock when formatting
  4345. Return: CF set on error
  4346.         AX = error code (01h,02h,etc.) (see #1020 at AH=59h/BX=0000h)
  4347.     CF clear if successful
  4348. Note:    the logical volume must be locked before direct disk accesses are
  4349.       permitted by Windows95
  4350. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Bh,AX=440Dh/CX=086Ah
  4351. SeeAlso: AX=440Dh/CX=086Ch
  4352.  
  4353. Bitfields for drive permissions:
  4354. Bit(s)    Description    (Table 0917)
  4355.  0    allow writes
  4356.  1    disallow new file mappings
  4357.  2    volume locked for formatting
  4358. --------D-21440DCX084B-----------------------
  4359. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - LOCK PHYSICAL VOLUME
  4360.     AX = 440Dh
  4361.     CX = 084Bh (category code 08h, minor code 4Bh)
  4362.     BL = physical drive number (00h-7Fh = floppy, 80h-FFh = hard disk)
  4363.     BH = lock level (00h-03h)
  4364.     DX = drive permissions (see #0917) for Level 1 lock or second
  4365.         Level 0 lock when formatting
  4366. Return: CF set on error
  4367.         AX = error code (01h,02h,etc.) (see #1020 at AH=59h/BX=0000h)
  4368.     CF clear if successful
  4369. Note:    the physical volume must be locked before direct disk writes via
  4370.       INT 13 are permitted by Windows95
  4371. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Bh
  4372. SeeAlso: AX=440Dh/CX=086Ch
  4373. --------D-21440DCX086A-----------------------
  4374. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - UNLOCK LOGICAL VOLUME
  4375.     AX = 440Dh
  4376.     CX = 086Ah (category code 08h, minor code 6Ah)
  4377.     BL = drive number (00h=default,01h=A:,etc)
  4378. Return: CF set on error
  4379.         AX = error code (01h,02h,etc.) (see #1020 at AH=59h/BX=0000h)
  4380.     CF clear if successful
  4381. Note:    the logical volume must be locked before direct disk accesses via
  4382.       INT 13 are permitted by Windows95
  4383. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Bh
  4384. --------D-21440DCX086B-----------------------
  4385. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - UNLOCK PHYSICAL VOLUME
  4386.     AX = 440Dh
  4387.     CX = 086Bh (category code 08h, minor code 6Bh)
  4388.     BL = physical drive number (00h-7Fh = floppy, 80h-FFh = hard disk)
  4389. Return: CF set on error
  4390.         AX = error code (01h,02h,etc.) (see #1020 at AH=59h/BX=0000h)
  4391.     CF clear if successful
  4392. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Bh,AX=440Dh/CX=086Ah
  4393. --------D-21440DCX086C-----------------------
  4394. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - GET LOCK FLAG STATE
  4395.     AX = 440Dh
  4396.     CX = 086Ch (category code 08h, minor code 6Ch)
  4397.     BL = drive number (00h=default,01h=A:,etc)
  4398. Return: CF set on error
  4399.         AX = error code (01h,02h,etc.) (see #1020 at AH=59h/BX=0000h)
  4400.     CF clear if successful
  4401.         AX = access flag (see #0918)
  4402. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=084Bh
  4403. SeeAlso: AX=440Dh/CX=0870h
  4404.  
  4405. (Table 0918)
  4406. Values for drive access flag:
  4407.  0000h    no writes/file mappings since last call
  4408.  0001h    write operation has occurred since last call
  4409.  0002h    file mapping has occurred since last call
  4410. Note:    function 6Ch resets the access flag every time it is called
  4411. --------D-21440DCX086D-----------------------
  4412. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - ENUMERATE OPEN FILES
  4413.     AX = 440Dh
  4414.     CX = 086Dh (category code 08h, minor code 6Dh)
  4415.     BL = drive number (00h=default,01h=A:,etc)
  4416.     DS:DX -> buffer for ASCIZ pathname
  4417.     SI = file index (0000h to number of open files-1)
  4418.     DI = enumeration type (0000h all files, 0001h unmovable files)
  4419. Return: CF set on error
  4420.         AX = error code (01h,02h,12h,etc.) (see #1020 at AH=59h/BX=0000h)
  4421.         0012h if file index is out of range
  4422.     CF clear if successful
  4423.         AX = file open mode (BX from AX=6C00h or AX=716Ch)
  4424.         CX = file type (see #0919)
  4425. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Ah,AX=440Dh/CX=086Ch
  4426. SeeAlso: AX=440Dh/CX=086Eh,AX=6C00h,AX=716Ch
  4427.  
  4428. (Table 0919)
  4429. Values for file type:
  4430.  0000h    normal file
  4431.  0001h    memory-mapped file (unmovable)
  4432.  0002h    unmovable file
  4433.  0004h    swap file
  4434. --------D-21440DCX086E-----------------------
  4435. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - FIND SWAP FILE
  4436.     AX = 440Dh
  4437.     CX = 086Eh (category code 08h, minor code 6Eh)
  4438.     BL = drive number (00h=default,01h=A:,etc)
  4439.     DS:DX -> buffer for ASCIZ pathname
  4440.     SI = file index
  4441.     DI = enumeration type
  4442. Return: CF set on error
  4443.         AX = error code (01h,02h,etc.) (see #1020 at AH=59h/BX=0000h)
  4444.     CF clear if successful
  4445.         AX = pager type
  4446.         0001h no pager
  4447.         0002h paging through MS-DOS
  4448.         0003h protected-mode pager
  4449.         CX:BX = swap file size in 4K pages
  4450. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Dh
  4451. --------D-21440DCX0870-----------------------
  4452. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - GET CURRENT LOCK STATE
  4453.     AX = 440Dh
  4454.     CX = 0870h (category code 08h, minor code 70h)
  4455.     BL = drive number (00h=default,01h=A:,etc)
  4456. Return: CF set on error
  4457.         AX = error code (01h,02h,etc.) (see #1020 at AH=59h/BX=0000h)
  4458.     CF clear if successful
  4459.         AX = current lock level (0-3) or FFFFh if not locked
  4460.         CX = lock permissions if AX<>FFFFh (see #0917)
  4461. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Ch
  4462. --------D-21440DCX0871-----------------------
  4463. INT 21 - MS-DOS 7.0 - GENERIC IOCTL - GET FIRST CLUSTER
  4464.     AX = 440Dh
  4465.     CX = 0871h (category code 08h, minor code 71h)
  4466.     BX = filename character set (see #0920)
  4467.     DS:DX -> ASCIZ pathname for file or directory
  4468. Return: CF set on error
  4469.         AX = error code (01h,02h,etc.) (see #1020 at AH=59h/BX=0000h)
  4470.     CF clear if successful
  4471.         DX:AX = first cluster number
  4472. Note:    this function finds any file or directory regardless of attributes,
  4473.       except that it will not find volume labels
  4474. SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=086Ch,#0700
  4475.  
  4476. (Table 0920)
  4477. Values for character set:
  4478.  00h    Windows ANSI
  4479.  01h    current OEM character set
  4480.  02h    Unicode
  4481. --------D-21440E-----------------------------
  4482. INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
  4483.     AX = 440Eh
  4484.     BL = drive number (00h=default,01h=A:,etc)
  4485. Return: CF set on error
  4486.         AX = error code (01h,0Fh) (see #1020 at AH=59h/BX=0000h)
  4487.     CF clear if successful
  4488.         AL = 00h block device has only one logical drive assigned
  4489.          1..26 the last letter used to reference the drive (1=A:,etc)
  4490. Notes:    DR DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
  4491.       always returns AL=00h
  4492.     in addition to the normal operation, if Stacker is installed, this
  4493.       call also sets the volume number at offset 58h in the Stacker
  4494.       device driver (DR DOS 3.41-5.0 only; use AX=4408h otherwise)
  4495.       (see AX=4404h"Stacker",INT 25/AX=CDCDh)
  4496. SeeAlso: AX=4408h,AX=440Fh,INT 2F/AX=122Bh
  4497. --------D-21440F-----------------------------
  4498. INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
  4499.     AX = 440Fh
  4500.     BL = physical drive number (00h=default,01h=A:,etc))
  4501. Return: CF set on error
  4502.         AX = error code (01h,0Fh) (see #1020 at AH=59h/BX=0000h)
  4503.     CF clear if successful
  4504.         drive now responds to next logical drive number
  4505. Notes:    maps logical drives to physical drives, similar to DOS's treatment of
  4506.       a single physical floppy drive as both A: and B:
  4507.     DR DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
  4508.       always returns an error on this function
  4509. SeeAlso: AX=440Eh,INT 2F/AX=122Bh
  4510. --------D-214410-----------------------------
  4511. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (HANDLE)
  4512.     AX = 4410h
  4513.     BX = handle for device
  4514.     CH = category code (see #0887)
  4515.     CL = function code (see #0888)
  4516. Return: CF clear if successful
  4517.         AX = 0000h    specified IOCTL function is supported
  4518.     CF set on error
  4519.         AL = 01h    IOCTL capability not available
  4520. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  4521.       standard DOS 3.2 set may use this call first to see whether a
  4522.       particular call is supported
  4523. SeeAlso: AX=440Ch,AX=440Dh"DOS 3.2+",AX=4411h
  4524. --------d-214410BXFFFF-----------------------
  4525. INT 21 U - NewSpace - ENABLE DRIVER
  4526.     AX = 4410h
  4527.     BX = FFFFh
  4528. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  4529.       all files as they are written and decompresses them as they are read
  4530. Note:    compressed files are not accessible unless the driver is enabled
  4531. SeeAlso: AX=4411h/BX=FFFFh
  4532. --------D-214411-----------------------------
  4533. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (DRIVE)
  4534.     AX = 4411h
  4535.     BL = drive number
  4536.     CH = category code (see #0900)
  4537.     CL = function code (see #0901)
  4538. Return: CF clear if successful
  4539.         AX = 0000h    specified IOCTL function is supported
  4540.     CF set on error
  4541.         AL = 01h    IOCTL capability not available
  4542. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  4543.       standard DOS 3.2 set may use this call first to see whether a
  4544.       particular call is supported
  4545. SeeAlso: AX=440Ch,AX=440Dh"DOS 3.2+",AX=4410h
  4546. --------d-214411BXFFFF-----------------------
  4547. INT 21 U - NewSpace - DISABLE DRIVER
  4548.     AX = 4411h
  4549.     BX = FFFFh
  4550. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  4551.       all files as they are written and decompresses them as they are read
  4552. Note:    compressed files are not accessible unless the driver is enabled
  4553. SeeAlso: AX=4410h/BX=FFFFh
  4554. --------O-214412-----------------------------
  4555. INT 21 O - DR DOS 5.0-6.0 - DETERMINE DOS TYPE
  4556.     AX = 4412h
  4557.     CF set
  4558. Return: CF set if not DR DOS
  4559.         AX = error code (see #1020 at AH=59h/BX=0000h)
  4560.     CF clear if DR DOS
  4561.         DX = AX = version code (see #0922)
  4562. Note:    this obsolete call, which is no longer supported in Novell DOS 7, is
  4563.       identical to AX=4452h
  4564. SeeAlso: AX=4452h
  4565. --------d-214412BXFFFF-----------------------
  4566. INT 21 U - NewSpace - INSTALLATION CHECK???
  4567.     AX = 4412h
  4568.     BX = FFFFh
  4569. Return: AX = PSP segment of NewRes (resident driver for NewSpace)
  4570.     BX:DX -> ???
  4571.     CX = ???
  4572. SeeAlso: AX=4411h/BX=FFFFh
  4573. --------d-214413BXFFFF-----------------------
  4574. INT 21 U - NewSpace - GET ???
  4575.     AX = 4413h
  4576.     BX = FFFFh
  4577. Return: AX = code segment of NewRes (resident driver for NewSpace)
  4578.     BX = offset of ???
  4579. SeeAlso: AX=4412h/BX=FFFFh
  4580. --------O-214414-----------------------------
  4581. INT 21 OU - DR DOS 5.0-6.0 - SET GLOBAL PASSWORD
  4582.     AX = 4414h
  4583.     DS:DX -> password string (blank-padded to 8 characters)
  4584. Desc:    Specify the master password for accessing files.
  4585. Note:    this obsolete call, which is no longer supported in Novell DOS 7, is
  4586.       identical to AX=4454h
  4587. SeeAlso: AX=4454h
  4588. --------d-214414BXFFFF-----------------------
  4589. INT 21 U - NewSpace - DEBUGGING DUMP
  4590.     AX = 4414h
  4591.     BX = FFFFh
  4592. Return: debugging dump written to X:\NEWSPACE.SMP
  4593. SeeAlso: AX=4413h/BX=FFFFh,AX=44FFh/BX=FFFFh
  4594. --------O-2144-------------------------------
  4595. INT 21 OU - DR DOS 5.0-6.0 - HISTORY BUFFER, SHARE, AND HILOAD CONTROL
  4596.     AH = 44h
  4597.     AL = 16h to 18h
  4598. Note:    these obsolete subfunctions (which are no longer supported in Novell
  4599.       DOS 7) are identical to AX=4456h through 4458h
  4600. SeeAlso: AX=4456h,AX=4457h,AX=4458h
  4601. --------O-214451-----------------------------
  4602. INT 21 - Concurrent DOS v3.2+ - INSTALLATION CHECK
  4603.     AX = 4451h
  4604. Return: CF set if not Concurrent DOS
  4605.         AX = error code (see #1020 at AH=59h/BX=0000h)
  4606.     CF clear if successful
  4607.         AH = single-user/multiuser nature
  4608.         10h single-user
  4609.             AL = operating system version ID (see #0922)
  4610.         14h multiuser
  4611.             AL = operating system version ID (see #0921)
  4612. Notes:    as of Concurrent DOS/XM 5.0 (possibly earlier), the version is stored
  4613.       in the environment variable VER
  4614.     use this function if you are looking for multiuser capabilities,
  4615.       AX=4452h for single-user
  4616.     this function should never return the single-user values
  4617. SeeAlso: AX=4452h,AX=4459h
  4618.  
  4619. (Table 0921)
  4620. Values for Digital Research operating system version ID:
  4621.  32h    Concurrent PC DOS 3.2
  4622.  41h    Concurrent DOS 4.1
  4623.  50h    Concurrent DOS/XM 5.0 or Concurrent DOS/386 1.1
  4624.  60h    Concurrent DOS/XM 6.0 or Concurrent DOS/386 2.0
  4625.  62h    Concurrent DOS/XM 6.2 or Concurrent DOS/386 3.0
  4626.  66h    DR Multiuser DOS 5.1
  4627.  67h    Concurrent DOS 5.1
  4628. --------O-214452-----------------------------
  4629. INT 21 - DR DOS 3.41+ - DETERMINE DOS TYPE/GET DR DOS VERSION
  4630.     AX = 4452h ("DR")
  4631.     CF set
  4632. Return: CF set if not DR DOS
  4633.         AX = error code (see #1020 at AH=59h/BX=0000h)
  4634.     CF clear if DR DOS
  4635.         AX = version code
  4636.         AH = single-user/multiuser nature
  4637.         10h single-user
  4638.             AL = operating system version ID (see #0922)
  4639.         14h multiuser
  4640.             AL = operating system version ID (see #0921)
  4641.         DX modified (refer to note below)
  4642. Notes:    the DR DOS version is stored in the environment variable VER
  4643.     use this function if looking for single-user capabilities, AX=4451h
  4644.       if looking for multiuser; this call should never return multiuser
  4645.       values
  4646.     in DR DOS 3.41-6.0, DX=AX on return; for Novell DOS 7, DH=AH but DL=00h
  4647.       (reportedly, DH=00h when booting NWDOS7 from installation disks)
  4648.     Novell DOS 7 returns error code 0001h if SETVER 255.x is in effect for
  4649.       the calling program
  4650. SeeAlso: AX=4412h,AX=4451h,AX=4459h
  4651.  
  4652. (Table 0922)
  4653. Values for Digital Research operating system version ID:
  4654.  60h    DOS Plus
  4655.  63h    DR DOS 3.41
  4656.  64h    DR DOS 3.42
  4657.  65h    DR DOS 5.00
  4658.  67h    DR DOS 6.00
  4659.  70h    PalmDOS
  4660.  71h    DR DOS 6.0 March 1993 "business update"
  4661.  72h    Novell DOS 7.0
  4662. --------O-214454-----------------------------
  4663. INT 21 U - DR DOS 3.41+ - SET GLOBAL PASSWORD
  4664.     AX = 4454h
  4665.     DS:DX -> password string (blank-padded to 8 characters)
  4666. Desc:    Specify the master password for accessing files.
  4667. SeeAlso: AX=4303h,AX=4414h
  4668. --------O-214456-----------------------------
  4669. INT 21 U - DR DOS 5.0+ - HISTORY BUFFER CONTROL
  4670.     AX = 4456h
  4671.     DL = control flags (see #0923)
  4672. Return: AL = previous value of state flags (see #0924)
  4673. Note:    DR DOS 6.0 only checks bit 0 and ignores the rest of DL
  4674. SeeAlso: #0925
  4675.  
  4676. Bitfields for control flags:
  4677. Bit(s)    Description    (Table 0923)
  4678.  0    whose buffer: 0=application, 1=COMMAND.COM
  4679. ---Novell DOS 7---
  4680.  1    toggle HISTORY usage
  4681.  2    toggle INSERT state
  4682. Note:    only one bit at a time may be used
  4683.  
  4684. Bitfields for state flags:
  4685. Bit(s)    Description    (Table 0924)
  4686.  0    HISTORY buffer enabled
  4687.  1    INSERT enabled
  4688.  2-5    unused
  4689.  7    whose buffer: 0=application, 1=COMMAND.COM
  4690. --------O-214457-----------------------------
  4691. INT 21 U - DR DOS 5.0-6.0 - SHARE/HILOAD CONTROL
  4692.     AX = 4457h
  4693.     DH = subfunction
  4694.         00h enable/disable SHARE
  4695.         DL = 00h disable
  4696.            = 01h enable
  4697.            else Return: AX = ???
  4698.         01h get HILOAD status
  4699.         Return: AX = status
  4700.                 0000h off
  4701.                 0001h on
  4702.         02h set HILOAD status
  4703.         DL = new state (00h off, 01h on)
  4704.         Return: AX = ???
  4705.         other
  4706.         Return: AX = ???
  4707. Note:    This was seen called by COMMAND.COM of DR DOS 6.0; it does not seem
  4708.       to be supported by Novell DOS 7
  4709. SeeAlso: AX=4457h/DX=FFFFh
  4710. --------O-214457DXFFFF-----------------------
  4711. INT 21 U - DR DOS 6.0 - GET SHARE STATUS
  4712.     AX = 4457h
  4713.     DX = FFFFh
  4714. Return: AX = SHARE status
  4715. SeeAlso: INT 2F/AX=1000h
  4716. --------O-214458-----------------------------
  4717. INT 21 U - DR DOS 5.0+ internal - GET POINTER TO INTERNAL VARIABLE TABLE
  4718.     AX = 4458h
  4719. Return: ES:BX -> internal variable table (see #0925,#0926)
  4720.     AX = ??? (0B50h for DR DOS 5.0, 0A56h for DR DOS 6.0, 0FE4h for
  4721.           Novell DOS 7)
  4722. SeeAlso: AX=4452h
  4723.  
  4724. Format of DR DOS 5.0-6.0 internal variable table:
  4725. Offset    Size    Description    (Table 0925)
  4726.  00h    WORD    ???
  4727.  02h    WORD    segment of ???
  4728.  04h    WORD    offset within DOS data segment of history control structure
  4729.           for COMMAND.COM history buffer (see #0927)
  4730.  06h    WORD    offset within DOS data segment of history control structure
  4731.           for application history buffer (see #0927)
  4732.  08h    BYTE    initial history state flags (see #0924)
  4733.  09h  2 BYTEs    ???
  4734.  0Bh    WORD    KB of extended memory at startup
  4735.  0Dh    BYTE    number of far jump entry points
  4736.  0Eh    WORD    segment containing far jumps to DR DOS entry points (see #0928)
  4737.  10h    WORD    (only if kernel loaded in HMA) offset in HMA of first free HMA
  4738.           memory block (see #0929) or 0000h if none; segment is FFFFh
  4739.  12h    WORD    pointer to segment of environment variables set in CONFIG,
  4740.           or 0000h if already used
  4741. ---DR DOS 6.0---
  4742.  14h    WORD    (only if kernel loaded in HMA) offset in HMA of first used HMA
  4743.         memory block (see #0929) or 0000h if none; segment is FFFFh
  4744.  16h  8 BYTEs    ???
  4745.  1Eh    WORD    offset in DOS data segment of full COUNTRY.SYS filename
  4746.  20h  8 BYTEs    ???
  4747.  28h    WORD    offset in DOS data segment of SHARE hook table
  4748.  2Ah  2 BYTEs    ???
  4749.  2Ch    WORD    offset in DOS data segment of far pointer to INT 2F/AX=1000h
  4750.           handler
  4751. Note:    the segment used for the DR DOS 6.0 CONFIG environment variables
  4752.       (excluding COMSPEC, VER and OS) is only useful for programs/drivers
  4753.       called from CONFIG.SYS. The word is set to zero later when the area
  4754.       is copied to the COMMAND.COM environment space.  This allows
  4755.       CONFIG.SYS to pass information to AUTOEXEC.BAT.
  4756.  
  4757. Format of Novell DOS 7 internal variable table:
  4758. Offset    Size    Description    (Table 0926)
  4759.  00h    ???
  4760.  1Eh    WORD    offset of COUNTRY.SYS filename
  4761.  42h 16 DWORDs    pointers to ??? entry points
  4762.     ???
  4763.  
  4764. Format of history control structure:
  4765. Offset    Size    Description    (Table 0927)
  4766.  00h    WORD    segment of buffer
  4767.  02h    WORD    size of buffer in bytes
  4768.  04h    WORD    ???
  4769.  
  4770. Format of kernel entry jump table for DR DOS 5.0-6.0:
  4771. Offset    Size    Description    (Table 0928)
  4772.  00h  5 BYTEs    far jump to kernel entry point for CP/M CALL 5
  4773.  05h  5 BYTEs    far jump to kernel entry point for INT 20
  4774.  0Ah  5 BYTEs    far jump to kernel entry point for INT 21
  4775.  0Fh  5 BYTEs    far jump to kernel entry point for INT 22 (RETF)
  4776.  14h  5 BYTEs    far jump to kernel entry point for INT 23 (RETF)
  4777.  19h  5 BYTEs    far jump to kernel entry point for INT 24
  4778.  1Eh  5 BYTEs    far jump to kernel entry point for INT 25
  4779.  23h  5 BYTEs    far jump to kernel entry point for INT 26
  4780.  28h  5 BYTEs    far jump to kernel entry point for INT 27
  4781.  2Dh  5 BYTEs    far jump to kernel entry point for INT 28
  4782.  32h  5 BYTEs    far jump to kernel entry point for INT 2A (IRET)
  4783.  37h  5 BYTEs    far jump to kernel entry point for INT 2B (IRET)
  4784.  3Ch  5 BYTEs    far jump to kernel entry point for INT 2C (IRET)
  4785.  41h  5 BYTEs    far jump to kernel entry point for INT 2D (IRET)
  4786.  46h  5 BYTEs    far jump to kernel entry point for INT 2E (IRET)
  4787.  4Bh  5 BYTEs    far jump to kernel entry point for INT 2F
  4788. Notes:    all of these entry points are indirected through this jump table
  4789.       to allow the kernel to be relocated into high memory while leaving
  4790.       the actual entry addresses in low memory for maximum compatibility
  4791.     some of these entry points (22h,23h,24h,2Eh,2Fh) are replaced as soon
  4792.       as COMMAND.COM is loaded, and return immediately to the caller, some
  4793.       returning an error code (the original handler for INT 2F returns
  4794.       AL=03h [fail]).
  4795.  
  4796. Format of HMA Memory Block (DR DOS 6.0 kernel loaded in HMA):
  4797. Offset    Size    Description    (Table 0929)
  4798.  00h    WORD    offset of next HMA Memory Block (0000h if last block)
  4799.  02h    WORD    size of this block in bytes (at least 10h)
  4800.  04h    BYTE    type of HMA Memory Block (interpreted by MEM)
  4801.         00h system
  4802.         01h KEYB
  4803.         02h NLSFUNC
  4804.         03h SHARE
  4805.         04h TaskMAX
  4806.         05h COMMAND
  4807.  05h    var    TSR (or system) code and data. DR DOS TSR's, such as KEYB,
  4808.           hooks interrupts using segment FFFEh instead FFFFh.
  4809. --------O-214459-----------------------------
  4810. INT 21 - DR MultiUser DOS 5.0 - API
  4811.     AX = 4459h
  4812.     CL = function (see #3268 at INT E0"CP/M")
  4813.     DS,DX = parameters
  4814. Notes:    DR DOS 5.0 and Novell DOS 7 return CF set and AX=0001h
  4815.     this API is also available on INT E0
  4816. SeeAlso: AX=4452h,INT E0"CP/M"
  4817. --------v-2144A0-----------------------------
  4818. INT 21 - VIRUS - "Horns" - INSTALLATION CHECK
  4819.     AX = 44A0h
  4820. Return: AH = FFh if installed
  4821. SeeAlso: AX=4243h"VIRUS",AX=4B04h"VIRUS"
  4822. --------N-2144E0-----------------------------
  4823. INT 21 U - Sun PC-NFS - API???
  4824.     AX = 44E0h
  4825.     DS:DX -> ???
  4826.     SS:BP -> stack frame (see #0930)
  4827. Return: ???
  4828. Note:    this function is also supported by Beame&Whiteside's BWPCNFS shim; the
  4829.       description presented here was derived from that shim
  4830.  
  4831. Format of PC-NFS stack frame:
  4832. Offset    Size    Description    (Table 0930)
  4833.  00h    WORD    -> previous stack frame
  4834.  02h    DWORD    return address
  4835. --------d-2144FFBXFFFF-----------------------
  4836. INT 21 U - NewSpace - ???
  4837.     AX = 44FFh
  4838.     BX = FFFFh
  4839.     DX = ???
  4840. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  4841.       all files as they are written and decompresses them as they are read
  4842. SeeAlso: AX=4414h/BX=FFFFh
  4843. --------D-2145-------------------------------
  4844. INT 21 - DOS 2+ - "DUP" - DUPLICATE FILE HANDLE
  4845.     AH = 45h
  4846.     BX = file handle
  4847. Return: CF clear if successful
  4848.         AX = new handle
  4849.     CF set on error
  4850.         AX = error code (04h,06h) (see #1020 at AH=59h/BX=0000h)
  4851. Notes:    moving file pointer for either handle will also move it for the other,
  4852.       because both will refer to the same system file table
  4853.     for DOS versions prior to 3.3, file writes may be forced to disk by
  4854.       duplicating the file handle and closing the duplicate
  4855. SeeAlso: AH=3Dh,AH=46h
  4856. --------D-2146-------------------------------
  4857. INT 21 - DOS 2+ - "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE
  4858.     AH = 46h
  4859.     BX = file handle
  4860.     CX = file handle to become duplicate of first handle
  4861. Return: CF clear if successful
  4862.     CF set on error
  4863.         AX = error code (04h,06h) (see #1020 at AH=59h/BX=0000h)
  4864. Notes:    closes file with handle CX if it is still open
  4865.     DOS 3.30 hangs if BX=CX on entry
  4866.     moving file pointer for either handle will also move it for the other,
  4867.       because both will refer to the same system file table
  4868. SeeAlso: AH=3Dh,AH=45h
  4869. --------D-2147-------------------------------
  4870. INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
  4871.     AH = 47h
  4872.     DL = drive number (00h = default, 01h = A:, etc)
  4873.     DS:SI -> 64-byte buffer for ASCIZ pathname
  4874. Return: CF clear if successful
  4875.         AX = 0100h (undocumented)
  4876.     CF set on error
  4877.         AX = error code (0Fh) (see #1020 at AH=59h/BX=0000h)
  4878. Notes:    the returned path does not include a drive or the initial backslash
  4879.     many Microsoft products for Windows rely on AX being 0100h on success
  4880.     under the FlashTek X-32 DOS extender, the buffer pointer is in DS:ESI
  4881. SeeAlso: AH=19h,AH=3Bh,AH=71h,INT 15/AX=DE25h
  4882. --------D-2148-------------------------------
  4883. INT 21 - DOS 2+ - ALLOCATE MEMORY
  4884.     AH = 48h
  4885.     BX = number of paragraphs to allocate
  4886. Return: CF clear if successful
  4887.         AX = segment of allocated block
  4888.     CF set on error
  4889.         AX = error code (07h,08h) (see #1020 at AH=59h/BX=0000h)
  4890.         BX = size of largest available block
  4891. Notes:    DOS 2.1-6.0 coalesces free blocks while scanning for a block to
  4892.       allocate
  4893.     .COM programs are initially allocated the largest available memory
  4894.       block, and should free some memory with AH=49h before attempting any
  4895.       allocations
  4896.     under the FlashTek X-32 DOS extender, EBX contains a protected-mode
  4897.       near pointer to the allocated block on a successful return
  4898. SeeAlso: AH=49h,AH=4Ah,AH=58h,AH=83h
  4899. --------D-2149-------------------------------
  4900. INT 21 - DOS 2+ - FREE MEMORY
  4901.     AH = 49h
  4902.     ES = segment of block to free
  4903. Return: CF clear if successful
  4904.     CF set on error
  4905.         AX = error code (07h,09h) (see #1020 at AH=59h/BX=0000h)
  4906. Notes:    apparently never returns an error 07h, despite official docs; DOS 2.1+
  4907.       code contains only an error 09h exit
  4908.     DOS 2.1-6.0 does not coalesce adjacent free blocks when a block is
  4909.       freed, only when a block is allocated or resized
  4910.     the code for this function is identical in DOS 2.1-6.0 except for
  4911.       calls to start/end a critical section in DOS 3.0+
  4912. SeeAlso: AH=48h,AH=4Ah
  4913. --------D-214A-------------------------------
  4914. INT 21 - DOS 2+ - RESIZE MEMORY BLOCK
  4915.     AH = 4Ah
  4916.     BX = new size in paragraphs
  4917.     ES = segment of block to resize
  4918. Return: CF clear if successful
  4919.     CF set on error
  4920.         AX = error code (07h,08h,09h) (see #1020 at AH=59h/BX=0000h)
  4921.         BX = maximum paragraphs available for specified memory block
  4922. Notes:    under DOS 2.1-6.0, if there is insufficient memory to expand the block
  4923.       as much as requested, the block will be made as large as possible
  4924.     DOS 2.1-6.0 coalesces any free blocks immediately following the block
  4925.       to be resized
  4926. SeeAlso: AH=48h,AH=49h,AH=83h
  4927. --------v-214A--BX00B6-----------------------
  4928. INT 21 - VIRUS???
  4929.     AH = 4Ah
  4930.     BX = 00B6h
  4931.     ES = CX
  4932. Return: ???
  4933. Note:    this call is intercepted by the Search&Destroy SDRes v27.03 bundled
  4934.       with Novell DOS 7, and is presumably some virus's installation check
  4935. SeeAlso: AH=0Eh/DL=ADh,AH=4Ah/BX=FFFFh,AH=D2h"VIRUS"
  4936. --------v-214A--BXFFFF-----------------------
  4937. INT 21 - VIRUS???
  4938.     AH = 4Ah
  4939.     BX = FFFFh
  4940.     CX = 0568h
  4941.     SI = 0129h
  4942.     DI = 0000h
  4943.     ES = BP
  4944. Return: ???
  4945. Note:    this call is intercepted by the Search&Destroy SDRes v27.03 bundled
  4946.       with Novell DOS 7, and is presumably some virus's installation check
  4947. SeeAlso: AH=0Eh/DL=ADh,AH=4Ah/BX=00B6h
  4948. --------D-214B-------------------------------
  4949. INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
  4950.     AH = 4Bh
  4951.     AL = type of load
  4952.         00h load and execute
  4953.         01h load but do not execute
  4954.         03h load overlay (see #0932)
  4955.         04h load and execute in background (European MS-DOS 4.0 only)
  4956.         "Exec & Go" (see also AH=80h)
  4957.     DS:DX -> ASCIZ program name (must include extension)
  4958.     ES:BX -> parameter block (see #0931,#0932,#0933)
  4959.     CX = mode (subfunction 04h only)
  4960.         0000h child placed in zombie mode after termination
  4961.         0001h child's return code discarded on termination
  4962. Return: CF clear if successful
  4963.         BX,DX destroyed
  4964.         if subfunction 01h, process ID set to new program's PSP; get with
  4965.         INT 21/AH=62h
  4966.     CF set on error
  4967.         AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see #1020 at AH=59h)
  4968. Notes:    DOS 2.x destroys all registers, including SS:SP
  4969.     under ROM-based DOS, if no disk path characters (colons or slashes)
  4970.       are included in the program name, the name is searched for in the
  4971.       ROM module headers (see #0936) before searching on disk
  4972.     for functions 00h and 01h, the calling process must ensure that there
  4973.       is enough unallocated memory available; if necessary, by releasing
  4974.       memory with AH=49h or AH=4Ah
  4975.     for function 01h, the AX value to be passed to the child program is put
  4976.       on top of the child's stack
  4977.     for function 03h, DOS assumes that the overlay is being loaded into
  4978.       memory allocated by the caller
  4979.     function 01h was undocumented prior to the release of DOS 5.0
  4980.     some versions (such as DR DOS 6.0) check the parameters and parameter
  4981.       block and return an error if an invalid value (such as an offset of
  4982.       FFFFh) is found
  4983.     background programs under European MS-DOS 4.0 must use the new
  4984.       executable format
  4985.     this function ignores the filename extension, instead checking the
  4986.       first two bytes of the file to determine whether there is a valid
  4987.       .EXE header (see #0935); if not, the file is assumed to be in .COM
  4988.       format.  If present, the file may be in any of several formats which
  4989.       are extensions of the original .EXE format (see #0934)
  4990.     .COM-format executables begin running with the following register
  4991.       values:
  4992.         AL = 00h if first FCB has valid drive letter, FFh if not
  4993.         AH = 00h if second FCB has valid drive letter, FFh if not
  4994.         CS,DS,ES,SS = PSP segment
  4995.         SP = offset of last word available in first 64K segment
  4996.         (note: AX is always 0000h under DESQview)
  4997.     old-format executables begin running with the following register
  4998.       values:
  4999.         AL = 00h if first FCB has valid drive letter, FFh if not
  5000.         AH = 00h if second FCB has valid drive letter, FFh if not
  5001.         DS,ES = PSP segment
  5002.         SS:SP as defined in .EXE header
  5003.         (note: AX is always 0000h under DESQview)
  5004.     new executables begin running with the following register values
  5005.         AX = environment segment
  5006.         BX = offset of command tail in environment segment
  5007.         CX = size of automatic data segment (0000h = 64K)
  5008.         ES,BP = 0000h
  5009.         DS = automatic data segment
  5010.         SS:SP = initial stack
  5011.       the command tail corresponds to an old executable's PSP:0081h and
  5012.       following, except that the 0Dh is turned into a NUL (00h); new
  5013.       format executables have no PSP
  5014.     under the FlashTek X-32 DOS extender, only function 00h is supported
  5015.       and the pointers are passed in DS:EDX and ES:EBX
  5016.     DR DOS 6 always loads .EXE-format programs with no fixups and
  5017.       .COM-format programs starting with 9Ch 55h (PUSHF/PUSH BP) above the
  5018.       64K mark to avoid the EXEPACK bug, by extending the memory block
  5019.       containing the program's environment; this code is disabled if the
  5020.       name of the parent program as stored in the MCB is 'WIN'.
  5021. BUGS:    DOS 2.00 assumes that DS points at the current program's PSP
  5022.     Load Overlay (subfunction 03h) loads up to 512 bytes too many if the
  5023.       file contains additional data after the actual overlay
  5024. SeeAlso: AX=4B05h,AH=4Ch,AH=4Dh,AH=64h/BX=0025h,AH=8Ah,INT 2E,INT 60/DI=0604h
  5025.  
  5026. Format of EXEC parameter block for AL=00h,01h,04h:
  5027. Offset    Size    Description    (Table 0931)
  5028.  00h    WORD    segment of environment to copy for child process (copy caller's
  5029.           environment if 0000h)
  5030.  02h    DWORD    pointer to command tail to be copied into child's PSP
  5031.  06h    DWORD    pointer to first FCB to be copied into child's PSP
  5032.  0Ah    DWORD    pointer to second FCB to be copied into child's PSP
  5033.  0Eh    DWORD    (AL=01h) will hold subprogram's initial SS:SP on return
  5034.  12h    DWORD    (AL=01h) will hold entry point (CS:IP) on return
  5035. SeeAlso: #0932,#0933
  5036.  
  5037. Format of EXEC parameter block for AL=03h:
  5038. Offset    Size    Description    (Table 0932)
  5039.  00h    WORD    segment at which to load overlay
  5040.  02h    WORD    relocation factor to apply to overlay if in .EXE format
  5041. SeeAlso: #0931,#0933
  5042.  
  5043. Format of EXEC parameter block for FlashTek X-32:
  5044. Offset    Size    Description    (Table 0933)
  5045.  00h    PWORD    48-bit far pointer to environment string
  5046.  06h    PWORD    48-bit far pointer to command tail string
  5047. SeeAlso: #0931,#0932
  5048.  
  5049. (Table 0934)
  5050. Values for the executable types understood by various environments:
  5051.  MZ    old-style DOS executable (see #0935)
  5052.  NE    Windows or OS/2 1.x segmented ("new") executable (see #0937)
  5053.  LE    Windows virtual device driver (VxD) linear executable (see #0950)
  5054.  LX    variant of LE used in OS/2 2.x (see #0950)
  5055.  W3    Windows WIN386.EXE file; a collection of LE files
  5056.  PE    Win32 (Windows NT and Win32s) portable executable based on Unix COFF
  5057.  DL    HP 100LX/200LX system manager compliant executable (.EXM)
  5058.  MP    old PharLap .EXP (see #0960)
  5059.  P2    PharLap 286 .EXP (see #0961)
  5060.  P3    PharLap 386 .EXP (see #0961)
  5061.  
  5062. Format of .EXE file header:
  5063. Offset    Size    Description    (Table 0935)
  5064.  00h  2 BYTEs    .EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
  5065.           (see also #0934)
  5066.  02h    WORD    number of bytes in last 512-byte page of executable
  5067.  04h    WORD    total number of 512-byte pages in executable (includes any
  5068.         partial last page)
  5069.  06h    WORD    number of relocation entries
  5070.  08h    WORD    header size in paragraphs
  5071.  0Ah    WORD    minimum paragraphs of memory required to allocate in addition
  5072.           to executable's size
  5073.  0Ch    WORD    maximum paragraphs to allocate in addition to executable's size
  5074.  0Eh    WORD    initial SS relative to start of executable
  5075.  10h    WORD    initial SP
  5076.  12h    WORD    checksum (one's complement of sum of all words in executable)
  5077.  14h    DWORD    initial CS:IP relative to start of executable
  5078.  18h    WORD    offset within header of relocation table
  5079.         40h or greater for new-format (NE,LE,LX,W3,PE,etc.) executable
  5080.  1Ah    WORD    overlay number (normally 0000h = main program)
  5081. ---new executable---
  5082.  1Ch  4 BYTEs    ???
  5083.  20h    WORD    behavior bits
  5084.  22h 26 BYTEs    reserved for additional behavior info
  5085.  3Ch    DWORD    offset of new executable (NE,LE,etc) header within disk file,
  5086.         or 00000000h if plain MZ executable
  5087. ---Borland TLINK---
  5088.  1Ch  2 BYTEs    ??? (apparently always 01h 00h)
  5089.  1Eh    BYTE    signature FBh
  5090.  1Fh    BYTE    TLINK version (major in high nybble, minor in low nybble)
  5091.  20h  2 BYTEs    ??? (v2.0 apparently always 72h 6Ah, v3.0+ seems always 6Ah 72h)
  5092. ---ARJ self-extracting archive---
  5093.  1Ch  4 BYTEs    signature "RJSX" (older versions, new signature is "aRJsfX" in
  5094.         the first 1000 bytes of the file)
  5095. ---LZEXE 0.90 compressed executable---
  5096.  1Ch  4 BYTEs    signature "LZ09"
  5097. ---LZEXE 0.91 compressed executable---
  5098.  1Ch  4 BYTEs    signature "LZ91"
  5099. ---PKLITE compressed executable---
  5100.  1Ch    BYTE    minor version number
  5101.  1Dh    BYTE    bits 0-3: major version
  5102.         bit 4: extra compression
  5103.         bit 5: huge (multi-segment) file
  5104.  1Eh  6 BYTEs    signature "PKLITE" (followed by copyright message)
  5105. ---LHarc 1.x self-extracting archive---
  5106.  1Ch  4 BYTEs    unused???
  5107.  20h  3 BYTEs    jump to start of extraction code
  5108.  23h  2 BYTEs    ???
  5109.  25h 12 BYTEs    signature "LHarc's SFX "
  5110. ---LHA 2.x self-extracting archive---
  5111.  1Ch  8 BYTEs    ???
  5112.  24h 10 BYTEs    signature "LHa's SFX " (v2.10) or "LHA's SFX " (v2.13)
  5113. ---TopSpeed C 3.0 CRUNCH compressed file---
  5114.  1Ch    DWORD    018A0001h
  5115.  20h    WORD    1565h
  5116. ---PKARCK 3.5 self-extracting archive---
  5117.  1Ch    DWORD    00020001h
  5118.  20h    WORD    0700h
  5119. ---BSA (Soviet archiver) self-extracting archive---
  5120.  1Ch    WORD    000Fh
  5121.  1Eh    BYTE    A7h
  5122. ---LARC self-extracting archive---
  5123.  1Ch  4 BYTEs    ???
  5124.  20h 11 BYTEs    "SFX by LARC "
  5125. ---LH self-extracting archive---
  5126.  1Ch  8 BYTEs    ???
  5127.  24h  8 BYTEs    "LH's SFX "
  5128. ---RAR self-extracting archive---
  5129.  1Ch  4 BYTEs    signature "RSFX"
  5130. ---other linkers---
  5131.  1Ch    var    optional information
  5132. ---
  5133.   N   N DWORDs    relocation items
  5134. Notes:    if word at offset 02h is 4, it should be treated as 00h, since pre-1.10
  5135.       versions of the MS linker set it that way
  5136.     if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
  5137.       program is loaded as high in memory as possible (DOS only checks
  5138.       the maximum allocation, however)
  5139.     the maximum allocation is set to FFFFh by default
  5140.     additional data may be contained in the file beyond the end of the
  5141.       load image described by the .EXE header; this data may be overlays,
  5142.       the actual executable for newer-format executables, or debugging
  5143.       information (see #0941,#0965)
  5144. SeeAlso: #0937
  5145.  
  5146. Format of ROM Module Header:
  5147. Offset    Size    Description    (Table 0936)
  5148.  00h  2 BYTEs    ROM signature 55h, AAh
  5149.  02h    BYTE    size of ROM in 512-byte blocks
  5150.  03h  3 BYTEs    POST initialization entry point (near JMP instruction)
  5151.  06h    ROM Program Name List [array]
  5152.     Offset    Size    Description
  5153.      00h    BYTE    length of ROM program's name (00h if end of name list)
  5154.      01h  N BYTEs    program name
  5155.      N+1  3 BYTEs    program entry point (near JMP instruction)
  5156.  
  5157. Format of new executable header:
  5158. Offset    Size    Description    (Table 0937)
  5159.  00h  2 BYTEs    "NE" (4Eh 45h) signature
  5160.  02h  2 BYTEs    linker version (major, then minor)
  5161.  04h    WORD    offset from start of this header to entry table (see #0944)
  5162.  06h    WORD    length of entry table in bytes
  5163.  08h    DWORD    file load CRC (0 in Borland's TPW)
  5164.  0Ch    BYTE    program flags (see #0938)
  5165.  0Dh    BYTE    application flags (see #0939)
  5166.  0Eh    WORD    auto data segment index
  5167.  10h    WORD    initial local heap size
  5168.  12h    WORD    initial stack size (added to data seg, 0000h if SS <> DS)
  5169.  14h    DWORD    program entry point (CS:IP), "CS" is index into segment table
  5170.  18h    DWORD    initial stack pointer (SS:SP), "SS" is segment index
  5171.         if SS=automatic data segment and SP=0000h, the stack pointer is
  5172.           set to the top of the automatic data segment, just below the
  5173.           local heap
  5174.  1Ch    WORD    segment count
  5175.  1Eh    WORD    module reference count
  5176.  20h    WORD    length of nonresident names table in bytes
  5177.  22h    WORD    offset from start of this header to segment table (see #0942)
  5178.  24h    WORD    offset from start of this header to resource table
  5179.  26h    WORD    offset from start of this header to resident names table
  5180.  28h    WORD    offset from start of this header to module reference table
  5181.  2Ah    WORD    offset from start of this header to imported names table
  5182.         (array of counted strings, terminated with a string of length
  5183.           00h)
  5184.  2Ch    DWORD    offset from start of file to nonresident names table
  5185.  30h    WORD    count of moveable entry point listed in entry table
  5186.  32h    WORD    file alignment size shift count
  5187.         0 is equivalent to 9 (default 512-byte pages)
  5188.  34h    WORD    number of resource table entries
  5189.  36h    BYTE    target operating system
  5190.         00h unknown
  5191.         01h OS/2
  5192.         02h Windows
  5193.         03h European MS-DOS 4.x
  5194.         04h Windows 386
  5195.         05h BOSS (Borland Operating System Services)
  5196.         81h PharLap 286|DOS-Extender, OS/2
  5197.         82h PharLap 286|DOS-Extender, Windows
  5198.  37h    BYTE    other EXE flags (see #0940)
  5199.  38h    WORD    offset to return thunks or start of gangload area
  5200.  3Ah    WORD    offset to segment reference thunks or length of gangload area
  5201.  3Ch    WORD    minimum code swap area size
  5202.  3Eh  2 BYTEs    expected Windows version (minor version first)
  5203. Note:    this header is documented in detail in the Windows 3.1 SDK Programmer's
  5204.       Reference, Vol 4.
  5205. SeeAlso: #0935
  5206.  
  5207. Bitfields for new executable program flags:
  5208. Bit(s)    Description    (Table 0938)
  5209.  0-1    DGROUP type
  5210.       0 = none
  5211.       1 = single shared
  5212.       2 = multiple (unshared)
  5213.       3 = (null)
  5214.  2    global initialization
  5215.  3    protected mode only
  5216.  4    8086 instructions
  5217.  5    80286 instructions
  5218.  6    80386 instructions
  5219.  7    80x87 instructions
  5220.  
  5221. Bitfields for new executable application flags:
  5222. Bit(s)    Description    (Table 0939)
  5223.  0-2    application type
  5224.     001 full screen (not aware of Windows/P.M. API)
  5225.     010 compatible with Windows/P.M. API
  5226.     011 uses Windows/P.M. API
  5227.  3    is a Family Application (OS/2)
  5228.  5    0=executable, 1=errors in image
  5229.  6    non-conforming program (valid stack is not maintained)
  5230.  7    DLL or driver rather than application
  5231.     (SS:SP info invalid, CS:IP points at FAR init routine called with
  5232.       AX=module handle which returns AX=0000h on failure, AX nonzero on
  5233.       successful initialization)
  5234.  
  5235. Bitfields for other new .EXE flags:
  5236. Bit(s)    Description    (Table 0940)
  5237.  0    supports long filenames
  5238.  1    2.X protected mode
  5239.  2    2.X proportional font
  5240.  3    gangload area
  5241.  
  5242. Format of Codeview trailer (at end of executable):
  5243. Offset    Size    Description    (Table 0941)
  5244.  00h    WORD    signature 4E42h ('NB')
  5245.  02h    WORD    Microsoft debug info version number
  5246.  04h    DWORD    Codeview header offset
  5247. SeeAlso: #0965
  5248.  
  5249. Format of new executable segment table record:
  5250. Offset    Size    Description    (Table 0942)
  5251.  00h    WORD    offset in file (shift left by alignment shift to get byte offs)
  5252.  02h    WORD    length of image in file (0000h = 64K)
  5253.  04h    WORD    segment attributes (see #0943)
  5254.  06h    WORD    number of bytes to allocate for segment (0000h = 64K)
  5255. Note:    the first segment table entry is entry number 1
  5256. SeeAlso: #0945
  5257.  
  5258. Bitfields for segment attributes:
  5259. Bit(s)    Description    (Table 0943)
  5260.  0    data segment rather than code segment
  5261.  1    unused???
  5262.  2    real mode
  5263.  3    iterated
  5264.  4    movable
  5265.  5    sharable
  5266.  6    preloaded rather than demand-loaded
  5267.  7    execute-only (code) or read-only (data)
  5268.  8    relocations (directly following code for this segment)
  5269.  9    debug info present
  5270.  10,11    80286 DPL bits
  5271.  12    discardable
  5272.  13-15    discard priority
  5273.  
  5274. Format of new executable entry table item (list):
  5275. Offset    Size    Description    (Table 0944)
  5276.  00h    BYTE    number of entry points (00h if end of entry table list)
  5277.  01h    BYTE    segment number (00h if end of entry table list)
  5278.  02h 3N BYTEs    entry records
  5279.         Offset    Size    Description
  5280.          00h    BYTE    flags
  5281.                 bit 0: exported
  5282.                 bit 1: single data
  5283.                 bits 2-7: unused???
  5284.          01h    WORD    offset within segment
  5285.  
  5286. Format of new executable relocation data (immediately follows segment image):
  5287. Offset    Size    Description    (Table 0945)
  5288.  00h    WORD    number of relocation items
  5289.  02h 8N BYTEs    relocation items
  5290.         Offset    Size    Description
  5291.          00h    BYTE    relocation type
  5292.                 00h LOBYTE
  5293.                 02h BASE
  5294.                 03h PTR
  5295.                 05h OFFS
  5296.                 0Bh PTR48
  5297.                 0Dh OFFS32
  5298.          01h    BYTE    flags
  5299.                 bit 2: additive
  5300.          02h    WORD    offset within segment
  5301.          04h    WORD    target address segment
  5302.          06h    WORD    target address offset
  5303. SeeAlso: #0942,#0946
  5304.  
  5305. Format of new executable resource data:
  5306. Offset    Size    Description    (Table 0946)
  5307.  00h    WORD    alignment shift count for resource data
  5308.  02h  N RECORDs resources
  5309.     Format of resource record:
  5310.     Offset    Size    Description
  5311.      00h    WORD    type ID
  5312.             0000h if end of resource records
  5313.             >= 8000h if integer type
  5314.             else offset from start of resource table to type string
  5315.      02h    WORD    number of resources of this type
  5316.      04h    DWORD    reserved for runtime use
  5317.      08h  N Resources (see #0947)
  5318. Note:    resource type and name strings are stored immediately following the
  5319.       resource table, and are not null-terminated
  5320. SeeAlso: #0947
  5321.  
  5322. Format of new executable resource entry:
  5323. Offset    Size    Description    (Table 0947)
  5324.  00h    WORD    offset in alignment units from start of file to contents of
  5325.         the resource data
  5326.  02h    WORD    length of resource image in bytes
  5327.  04h    WORD    flags
  5328.         bit 4: moveable
  5329.         bit 5: shareable
  5330.         bit 6: preloaded
  5331.  06h    WORD    resource ID
  5332.         >= 8000h if integer resource
  5333.         else offset from start of resource table to resource string
  5334.  08h    DWORD    reserved for runtime use
  5335. Notes:    resource type and name strings are stored immediately following the
  5336.       resource table, and are not null-terminated
  5337.     strings are counted strings, with a string of length 0 indicating the
  5338.       end of the resource table
  5339. SeeAlso: #0946,#0948
  5340.  
  5341. Format of new executable module reference table [one bundle of entries]:
  5342. Offset    Size    Description    (Table 0948)
  5343.  00h    BYTE    number of records in this bundle (00h if end of table)
  5344.  01h    BYTE    segment indicator
  5345.         00h unused
  5346.         FFh movable segment, segment number is in entry
  5347.         else segment number of fixed segment
  5348.  02h  N RECORDs
  5349.     Format of segment record
  5350.     Offset    Size    Description
  5351.      00h    BYTE    flags
  5352.             bit 0: entry is exported
  5353.             bit 1: entry uses global (shared) data
  5354.             bits 7-3: number of parameter words
  5355.     ---fixed segment---
  5356.      01h    WORD    offset
  5357.     ---moveable segment---
  5358.      01h  2 BYTEs    INT 3F instruction (CDh 3Fh)
  5359.      03h    BYTE    segment number
  5360.      05h    WORD    offset
  5361. Note:    table entries are numbered starting from 1
  5362. SeeAlso: #0949
  5363.  
  5364. Format of new executable resident/nonresident name table entry:
  5365. Offset    Size    Description    (Table 0949)
  5366.  00h    BYTE    length of string (00h if end of table)
  5367.  01h  N BYTEs    ASCII text of string
  5368.  N+1    WORD    ordinal number (index into entry table)
  5369. Notes:    the first string in the resident name table is the module name; the
  5370.       first entry in the nonresident name table is the module description
  5371.     the strings are case-sensitive; if the executable was linked with
  5372.       /IGNORECASE, all strings are in uppercase
  5373. SeeAlso: #0948
  5374.  
  5375. Format of Linear Executable (enhanced mode executable) header:
  5376. Offset    Size    Description    (Table 0950)
  5377.  00h  2 BYTEs    "LE" (4Ch 45h) signature (Windows)
  5378.         "LX" (4Ch 58h) signature (OS/2)
  5379.  02h    BYTE    byte order (00h = little-endian, nonzero = big-endian)
  5380.  03h    BYTE    word order (00h = little-endian, nonzero = big-endian)
  5381.  04h    DWORD    executable format level
  5382.  08h    WORD    CPU type (see also INT 15/AH=C9h)
  5383.         01h Intel 80286 or upwardly compatible
  5384.         02h Intel 80386 or upwardly compatible
  5385.         03h Intel 80486 or upwardly compatible
  5386.         04h Intel Pentium (80586) or upwardly compatible
  5387.         20h Intel i860 (N10) or compatible
  5388.         21h Intel "N11" or compatible
  5389.         40h MIPS Mark I (R2000, R3000) or compatible
  5390.         41h MIPS Mark II (R6000) or compatible
  5391.         42h MIPS Mark III (R4000) or compatible
  5392.  0Ah    WORD    target operating system
  5393.         01h OS/2
  5394.         02h Windows
  5395.         03h European DOS 4.0
  5396.         04h Windows 386
  5397.  0Ch    DWORD    module version
  5398.  10h    DWORD    module type (see #0951)
  5399.  14h    DWORD    number of memory pages
  5400.  18h    Initial CS:EIP
  5401.     DWORD    object number
  5402.     DWORD    offset
  5403.  20h    Initial SS:ESP
  5404.     DWORD    object number
  5405.     DWORD    offset
  5406.  28h    DWORD    memory page size
  5407.  2Ch    DWORD    (Windows LE) bytes on last page
  5408.         (OS/2 LX) page offset shift count
  5409.  30h    DWORD    fixup section size
  5410.  34h    DWORD    fixup section checksum
  5411.  38h    DWORD    loader section size
  5412.  3Ch    DWORD    loader section checksum
  5413.  40h    DWORD    offset of object table (see #0952)
  5414.  44h    DWORD    object table entries
  5415.  48h    DWORD    object page map table offset (see #0954)
  5416.  4Ch    DWORD    object iterate data map offset
  5417.  50h    DWORD    resource table offset
  5418.  54h    DWORD    resource table entries
  5419.  58h    DWORD    resident names table offset (see #0955)
  5420.  5Ch    DWORD    entry table offset (see #0956,#0957)
  5421.  60h    DWORD    module directives table offset
  5422.  64h    DWORD    Module Directives entries
  5423.  68h    DWORD    Fixup page table offset
  5424.  6Ch    DWORD    Fixup record table offset (see #0959)
  5425.  70h    DWORD    imported modules name table offset
  5426.  74h    DWORD    imported modules count
  5427.  78h    DWORD    imported procedures name table offset
  5428.  7Ch    DWORD    per-page checksum table offset
  5429.  80h    DWORD    data pages offset
  5430.  84h    DWORD    preload page count
  5431.  88h    DWORD    non-resident names table offset
  5432.  8Ch    DWORD    non-resident names table length
  5433.  90h    DWORD    non-resident names checksum
  5434.  94h    DWORD    automatic data object
  5435.  98h    DWORD    debug information offset
  5436.  9Ch    DWORD    debug information length
  5437.  A0h    DWORD    preload instance pages number
  5438.  A4h    DWORD    demand instance pages number
  5439.  A8h    DWORD    extra heap allocation
  5440.  ACh 12 BYTEs    reserved
  5441.  B8h    DWORD    offset of VERSIONINFO resource (MS-Windows VxD only)
  5442.  BCh    DWORD    pointer to ??? (dynamically-loadable VxDs only???)
  5443.  C0h    WORD    device ID (MS-Windows VxD only)
  5444.  C2h    WORD    DDK version (MS-Windows VxD only)
  5445. Note:    used by EMM386.EXE, QEMM, and Windows 3.0 Enhanced Mode drivers
  5446.  
  5447. Bitfields for Linear Executable module type:
  5448. Bit(s)    Description    (Table 0951)
  5449.  2    initialization (only for DLLs) 0 = global, 1 = per-process
  5450.  4    no internal fixups in executable image
  5451.  5    no external fixups in executable image
  5452.  8-10    API compatibility
  5453.     0 = unknown
  5454.     1 = incompatible with PM windowing \
  5455.     2 = compatible with PM windowing    > (only for
  5456.     3 = uses PM windowing API       /    programs)
  5457.  13    module not loadable (only for programs)
  5458.  15-17    module type
  5459.     000 program
  5460.     001 library (DLL)
  5461.     011 protected memory library module
  5462.     100 physical device driver
  5463.     110 virtual device driver
  5464.  30    per-process library termination
  5465.     (requires valid CS:EIP, can't be set for .EXE)
  5466.  
  5467. Format of object table entry:
  5468. Offset    Size    Description    (Table 0952)
  5469.  00h    DWORD    virtual size in bytes
  5470.  04h    DWORD    relocation base address
  5471.  08h    DWORD    object flags (see #0953)
  5472.  0Ch    DWORD    page map index
  5473.  10h    DWORD    page map entries (see #0954)
  5474.  14h  4 BYTEs    reserved??? (apparently always zeros)
  5475.  
  5476. Bitfields for object flags:
  5477. Bit(s)    Description    (Table 0953)
  5478.  0    readable
  5479.  1    writable
  5480.  2    executable
  5481.  3    resource
  5482.  4    discardable
  5483.  5    shared
  5484.  6    preloaded
  5485.  7    invalid
  5486.  8-9    type
  5487.     00 normal
  5488.     01 zero-filled
  5489.     10 resident
  5490.     11 resident and contiguous
  5491.  10    resident and long-lockable
  5492.  11    reserved
  5493.  12    16:16 alias required
  5494.  13    "BIG" (Huge: 32-bit)
  5495.  14    conforming
  5496.  15    "OBJECT_I/O_PRIVILEGE_LEVEL"
  5497.  16-31    reserved
  5498.  
  5499. Format of object page map table entry:
  5500. Offset    Size    Description    (Table 0954)
  5501.  00h    BYTE    ??? (usually 00h)
  5502.  01h    WORD    (big-endian) index to fixup table
  5503.         0000h if no relocation info
  5504.  03h    BYTE    type (00h hard copy in file, 03h some relocation needed)
  5505.  
  5506. Format of resident names table entry:
  5507. Offset    Size    Description    (Table 0955)
  5508.  00h    BYTE    length of name
  5509.  01h  N BYTEs    name
  5510.  N+1  3 BYTEs    ???
  5511.  
  5512. Format of LE linear executable entry table:
  5513. Offset    Size    Description    (Table 0956)
  5514.  00h    BYTE    number of entries in table
  5515.  01h 10 BYTEs per entry
  5516.         Offset    Size    Description
  5517.          00h    BYTE    bit flags
  5518.                 bit 0: non-empty bundle
  5519.                 bit 1: 32-bit entry
  5520.          01h    WORD    object number
  5521.          03h    BYTE    entry type flags
  5522.                 bit 0: exported
  5523.                 bit 1: uses single data rather than instance
  5524.                 bit 2: reserved
  5525.                 bits 3-7: number of stack parameters
  5526.          04h    DWORD    offset of entry point
  5527.          08h  2 BYTEs    ???
  5528. Note:    empty bundles (bit flags at 00h = 00h) are used to skip unused indices,
  5529.       and do not contain the remaining nine bytes
  5530.  
  5531. Format of LX linear executable entry table [array]:
  5532. Offset    Size    Description    (Table 0957)
  5533.  00h    BYTE    number of bundles following (00h = end of entry table)
  5534.  01h    BYTE    bundle type
  5535.         00h empty
  5536.         01h 16-bit entry
  5537.         02h 286 callgate entry
  5538.         03h 32-bit entry
  5539.         04h forwarder entry
  5540.         bit 7 set if additional parameter typing information is present
  5541. ---bundle type 00h---
  5542.  no additional fields
  5543. ---bundle type 01h---
  5544.  02h    WORD    object number
  5545.  04h    BYTE    entry flags
  5546.         bit 0: exported
  5547.         bits 7-3: number of stack parameters
  5548.  05h    WORD    offset of entry point in object (shifted by page size shift)
  5549. ---bundle type 02h---
  5550.  02h    WORD    object number
  5551.  04h    BYTE    entry flags
  5552.         bit 0: exported
  5553.         bits 7-3: number of stack parameters
  5554.  05h    WORD    offset of entry point in object
  5555.  07h    WORD    reserved for callgate selector (used by loader)
  5556. ---bundle type 03h---
  5557.  02h    WORD    object number
  5558.  04h    BYTE    entry flags
  5559.         bit 0: exported
  5560.         bits 7-3: number of stack parameters
  5561.  05h    DWORD    offset of entry point in object
  5562. ---bundle type 04h---
  5563.  02h    WORD    reserved
  5564.  04h    BYTE    forwarder flags
  5565.         bit 0: import by ordinal
  5566.         bits 7-1 reserved
  5567.  05h    WORD    module ordinal
  5568.         (forwarder's index into Import Module Name table)
  5569.  07h    DWORD    procedure name offset or import ordinal number
  5570. Note:    all fields after the first two bytes are repeated N times
  5571.  
  5572. Bitfields for linear executable fixup type:
  5573. Bit(s)    Description    (Table 0958)
  5574.  7    ordinal is BYTE rather than WORD
  5575.  6    16-rather than 8-object number/module ordinal
  5576.  5    addition with DWORD rather than WORD
  5577.  4    relocation info has size with new two bytes at end
  5578.  3    reserved (0)
  5579.  2    set if add to destination, clear to replace destination
  5580.  1-0    type
  5581.     00 internal fixup
  5582.     01 external fixup, imported by ordinal
  5583.     10 external fixup, imported by name
  5584.     11 internal fixup via entry table
  5585.  
  5586. Format of linear executable fixup record:
  5587. Offset    Size    Description    (Table 0959)
  5588.  00h    BYTE    type
  5589.         bits 7-4: modifier (0001 single, 0011 multiple)
  5590.         bits 3-0: type
  5591.             0000 byte offset
  5592.             0010 word segment
  5593.             0011 16-bit far pointer (DWORD)
  5594.             0101 16-bit offset
  5595.             0110 32-bit far pointer (PWORD)
  5596.             0111 32-bit offset
  5597.             1000 near call or jump, WORD/DWORD based on seg attrib
  5598.  01h    BYTE    linear executable fixup type (see #0958)
  5599. ---if single type---
  5600.  02h    WORD    offset within page
  5601.  04h    relocation information
  5602.     ---internal fixup---
  5603.     BYTE    object number
  5604.     ---external,ordinal---
  5605.     BYTE    one-based module number in Import Module table
  5606.     BYTE/WORD ordinal number
  5607.     WORD/DWORD value to add (only present if modifier bit 4 set)
  5608.     ---external,name---
  5609.     BYTE    one-based module number in Import Module table
  5610.     WORD    offset in Import Procedure names
  5611.     WORD/DWORD value to add (only present if modifier bit 4 set)
  5612. ---if multiple type---
  5613.  02h    BYTE    number of items
  5614.  03h    var    relocation info as for "single" type (above)
  5615.       N WORDs    offsets of items to relocate
  5616.  
  5617. Format of old Phar Lap .EXP file header:
  5618. Offset    Size    Description    (Table 0960)
  5619.  00h  2 BYTEs    "MP" (4Dh 50h) signature
  5620.  02h    WORD    remainder of image size / page size (page size = 512h)
  5621.  04h    WORD    size of image in pages
  5622.  06h    WORD    number of relocation items
  5623.  08h    WORD    header size in paragraphs
  5624.  0Ah    WORD    minimum number of extra 4K pages to be allocated at the end
  5625.           of program, when it is loaded
  5626.  0Ch    WORD    maximum number of extra 4K pages to be allocated at the end
  5627.           of program, when it is loaded
  5628.  0Eh    DWORD    initial ESP
  5629.  12h    WORD    word checksum of file
  5630.  14h    DWORD    initial EIP
  5631.  18h    WORD    offset of first relocation item
  5632.  1Ah    WORD    overlay number
  5633.  1Ch    WORD    ??? (wants to be 1)
  5634. SeeAlso: #0961
  5635.  
  5636. Format of new Phar Lap .EXP file header:
  5637. Offset    Size    Description    (Table 0961)
  5638.  00h  2 BYTEs    signature ("P2" for 286 .EXP executable, "P3" for 386 .EXP)
  5639.  02h    WORD    level (01h flat-model file, 02h multisegmented file)
  5640.  04h    WORD    header size
  5641.  06h    DWORD    file size in bytes
  5642.  0Ah    WORD    checksum
  5643.  0Ch    DWORD    offset of run-time parameters within file (see #0963)
  5644.  10h    DWORD    size of run-time parameters in bytes
  5645.  14h    DWORD    offset of relocation table within file
  5646.  18h    DWORD    size of relocation table in bytes
  5647.  1Ch    DWORD    offset of segment information table within file (see #0962)
  5648.  20h    DWORD    size of segment information table in bytes
  5649.  24h    WORD    size of segment information table entry in bytes
  5650.  26h    DWORD    offset of load image within file
  5651.  2Ah    DWORD    size of load image on disk
  5652.  2Eh    DWORD    offset of symbol table within file or 00000000h
  5653.  32h    DWORD    size of symbol table in bytes
  5654.  36h    DWORD    offset of GDT within load image
  5655.  3Ah    DWORD    size of GDT in bytes
  5656.  3Eh    DWORD    offset of LDT within load image
  5657.  42h    DWORD    size of LDT in bytes
  5658.  46h    DWORD    offset of IDT within load image
  5659.  4Ah    DWORD    size of IDT in bytes
  5660.  4Eh    DWORD    offset of TSS within load image
  5661.  52h    DWORD    size of TSS in bytes
  5662.  56h    DWORD    minimum number of extra bytes to be allocated at end of program
  5663.         (level 1 executables only)
  5664.  5Ah    DWORD    maximum number of extra bytes to be allocated at end of program
  5665.         (level 1 executables only)
  5666.  5Eh    DWORD    base load offset (level 1 executables only)
  5667.  62h    DWORD    initial ESP
  5668.  66h    WORD    initial SS
  5669.  68h    DWORD    initial EIP
  5670.  6Ch    WORD    initial CS
  5671.  6Eh    WORD    initial LDT
  5672.  70h    WORD    initial TSS
  5673.  72h    WORD    flags
  5674.         bit 0: load image is packed
  5675.         bit 1: 32-bit checksum is present
  5676.         bits 4-2: type of relocation table
  5677.  74h    DWORD    memory requirements for load image
  5678.  78h    DWORD    32-bit checksum (optional)
  5679.  7Ch    DWORD    size of stack segment in bytes
  5680.  80h 256 BYTEs    reserved (0)
  5681. SeeAlso: #0960,#0964
  5682.  
  5683. Format of Phar Lap segment information table entry:
  5684. Offset    Size    Description    (Table 0962)
  5685.  00h    WORD    selector number
  5686.  02h    WORD    flags
  5687.  04h    DWORD    base offset of selector
  5688.  08h    DWORD    minimum number of extra bytes to be allocated to the segment
  5689.  
  5690. Format of 386|DOS-Extender run-time parameters:
  5691. Offset    Size    Description    (Table 0963)
  5692.  00h  2 BYTEs    signature "DX" (44h 58h)
  5693.  02h    WORD    minimum number of real-mode params to leave free at run time
  5694.  04h    WORD    maximum number of real-mode params to leave free at run time
  5695.  06h    WORD    minimum interrupt buffer size in KB
  5696.  08h    WORD    maximum interrupt buffer size in KB
  5697.  0Ah    WORD    number of interrupt stacks
  5698.  0Ch    WORD    size in KB of each interrupt stack
  5699.  0Eh    DWORD    offset of byte past end of real-mode code and data
  5700.  12h    WORD    size in KB of call buffers
  5701.  14h    WORD    flags
  5702.         bit 0: file is virtual memory manager
  5703.         bit 1: file is a debugger
  5704.  16h    WORD    unprivileged flag (if nonzero, executes at ring 1, 2, or 3)
  5705.  18h 104 BYTEs    reserved (0)
  5706.  
  5707. Format of Phar Lap repeat block header:
  5708. Offset    Size    Description    (Table 0964)
  5709.  00h    WORD    byte count
  5710.  02h    BYTE    repeat string length
  5711.  
  5712. Format of Borland debugging information header (following load image):
  5713. Offset    Size    Description    (Table 0965)
  5714.  00h    WORD    signature 52FBh
  5715.  02h    WORD    version ID
  5716.  04h    DWORD    size of name pool in bytes
  5717.  08h    WORD    number of names in name pool
  5718.  0Ah    WORD    number of type entries
  5719.  0Ch    WORD    number of structure members
  5720.  0Eh    WORD    number of symbols
  5721.  10h    WORD    number of global symbols
  5722.  12h    WORD    number of modules
  5723.  14h    WORD    number of locals (optional)
  5724.  16h    WORD    number of scopes in table
  5725.  18h    WORD    number of line-number entries
  5726.  1Ah    WORD    number of include files
  5727.  1Ch    WORD    number of segment records
  5728.  1Eh    WORD    number of segment/file correlations
  5729.  20h    DWORD    size of load image after removing uninitialized data and debug
  5730.           information
  5731.  24h    DWORD    debugger hook; pointer into debugged program whose meaning
  5732.           depends on program flags
  5733.  28h    BYTE    program flags
  5734.         bit 0: case-sensitive link
  5735.         bit 1: pascal overlay program
  5736.  29h    WORD    no longer used
  5737.  2Bh    WORD    size of data pool in bytes
  5738.  2Dh    BYTE    padding
  5739.  2Eh    WORD    size of following header extension (currently 00h, 10h, or 20h)
  5740.  30h    WORD    number of classes
  5741.  32h    WORD    number of parents
  5742.  34h    WORD    number of global classes (currently unused)
  5743.  36h    WORD    number of overloads (currently unused)
  5744.  38h    WORD    number of scope classes
  5745.  3Ah    WORD    number of module classes
  5746.  3Ch    WORD    number of coverage offsets
  5747.  3Eh    DWORD    offset relative to symbol base of name pool
  5748.  42h    WORD    number of browser information records
  5749.  44h    WORD    number of optimized symbol records
  5750.  46h    WORD    debugging flags
  5751.  48h  8 BYTEs    padding
  5752. Note:    additional information on the Borland debugging info may be found in
  5753.       Borland's Open Architecture Handbook
  5754. SeeAlso: #0941
  5755. --------U-214B-------------------------------
  5756. INT 21 - ELRES v1.0 only - INSTALLATION CHECK
  5757.     AH = 4Bh
  5758.     DS:DX = 0000h:0000h
  5759. Return: ES:BX -> ELRES history structure (see #0728 at AH=2Bh/CX=454Ch)
  5760.     DX = DABEh (signature, DAve BEnnett)
  5761. Program: ELRES is an MS-DOS return code (errorlevel) recorder by David H.
  5762.       Bennett
  5763. SeeAlso: AH=2Bh/CX=454Ch
  5764. --------v-214B04-----------------------------
  5765. INT 21 - VIRUS - "MG", "699"/"Thirteen Minutes" - INSTALLATION CHECK
  5766.     AX = 4B04h
  5767. Return: CF clear if "MG" resident
  5768.     AX = 044Bh if "699"/"Thirteen Minutes" resident
  5769. SeeAlso: AX=4243h,AH=4Ah/BX=FFFFh,AX=4B21h
  5770. --------D-214B05-----------------------------
  5771. INT 21 - DOS 5+ - SET EXECUTION STATE
  5772.     AX = 4B05h
  5773.     DS:DX -> execution state structure (see #0966)
  5774. Return: CF clear if successful
  5775.         AX = 0000h
  5776.     CF set on error
  5777.         AX = error code (see #1020 at AH=59h/BX=0000h)
  5778. Note:    used by programs which intercept AX=4B00h to prepare new programs for
  5779.       execution (including setting the DOS version number).     No DOS, BIOS
  5780.       or other software interrupt may be called after return from this call
  5781.       before commencement of the child process.  If DOS is running in the
  5782.       HMA, A20 is turned off on return from this call.
  5783. SeeAlso: AH=4Bh
  5784.  
  5785. Format of execution state structure:
  5786. Offset    Size    Description    (Table 0966)
  5787.  00h    WORD    reserved (00h)
  5788.  02h    WORD    type flags
  5789.         bit 0: program is an .EXE
  5790.         bit 1: program is an overlay
  5791.  04h    DWORD    pointer to ASCIZ name of program file
  5792.  08h    WORD    PSP segment of new program
  5793.  0Ah    DWORD    starting CS:IP of new program
  5794.  0Eh    DWORD    program size including PSP
  5795. --------v-214B20-----------------------------
  5796. INT 21 - VIRUS - "Holocaust"/"Telefonica" - ???
  5797.     AX = 4B20h
  5798. SeeAlso: AX=4B04h,AX=4B21h
  5799. --------v-214B21-----------------------------
  5800. INT 21 C - VIRUS - "Holocaust"/"Telefonica" - ???
  5801.     AX = 4B21h
  5802. Note:    called at completion of virus installation
  5803. SeeAlso: AX=4B04h,AX=4B20h,AX=4B25h
  5804. --------v-214B25-----------------------------
  5805. INT 21 - VIRUS - "1063"/"Mono" - INSTALLATION CHECK
  5806.     AX = 4B25h
  5807. Return: DI = 1234h if resident
  5808. SeeAlso: AX=4B21h,AX=4B40h
  5809. --------v-214B40-----------------------------
  5810. INT 21 - VIRUS - "Plastique"/"AntiCad" - INSTALLATION CHECK
  5811.     AX = 4B40h
  5812. Return: AX = 5678h if resident
  5813. SeeAlso: AX=4B25h,AX=4B41h,AX=4B4Ah
  5814. --------v-214B41-----------------------------
  5815. INT 21 - VIRUS - "Plastique"/"AntiCad" - ???
  5816.     AX = 4B41h
  5817.     ???
  5818. Return: ???
  5819. SeeAlso: AX=4B40h
  5820. --------v-214B4A-----------------------------
  5821. INT 21 - VIRUS - "Jabberwocky" - INSTALLATION CHECK
  5822.     AX = 4B4Ah
  5823. Return: AL = 57h if resident
  5824. SeeAlso: AX=4B40h,AX=4B4Bh
  5825. --------v-214B4B-----------------------------
  5826. INT 21 - VIRUS - "Horse-2" - INSTALLATION CHECK
  5827.     AX = 4B4Bh
  5828. Return: CF clear if resident
  5829. SeeAlso: AX=4B4Ah,AX=4B4Dh
  5830. --------v-214B4D-----------------------------
  5831. INT 21 - VIRUS - "Murphy-2", "Patricia"/"Smack" - INSTALLATION CHECK
  5832.     AX = 4B4Dh
  5833. Return: CF clear if resident
  5834. SeeAlso: AX=4B4Ah,AX=4B50h
  5835. --------v-214B50-----------------------------
  5836. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - INSTALLATION CHECK
  5837.     AX = 4B50h
  5838. Return: AX = 1234h if resident
  5839. SeeAlso: AX=4B4Dh,AX=4B53h,AX=4B60h
  5840. --------v-214B53-----------------------------
  5841. INT 21 - VIRUS - "Horse" - INSTALLATION CHECK
  5842.     AX = 4B53h
  5843. Return: CF clear if resident
  5844. SeeAlso: AX=4B50h,AX=4B53h/BX=2121h,AX=4B55h
  5845. --------v-214B53BX2121-----------------------
  5846. INT 21 - VIRUS - "One Half" - INSTALLATION CHECK
  5847.     AX = 4B53h
  5848.     BX = 2121h
  5849.     CX = 1212h
  5850.     DX = 0236h
  5851. Return: AX = 454Bh if installed
  5852. SeeAlso: AX=4B50h,AX=4B53h,AX=4B55h
  5853. --------v-214B55-----------------------------
  5854. INT 21 - VIRUS - "Sparse" - INSTALLATION CHECK
  5855.     AX = 4B55h
  5856. Return: AX = 1231h if resident
  5857. SeeAlso: AX=4B53h,AX=4B59h
  5858. --------v-214B59-----------------------------
  5859. INT 21 - VIRUS - "Murphy-1", "Murphy-4" - INSTALLATION CHECK
  5860.     AX = 4B59h
  5861. Return: CF clear if resident
  5862. SeeAlso: AX=4B50h,AX=4B5Eh
  5863. --------v-214B5E-----------------------------
  5864. INT 21 - VIRUS - "Brothers" - INSTALLATION CHECK
  5865.     AX = 4B5Eh
  5866. Return: CF clear if resident
  5867. SeeAlso: AX=4B59h,AX=4B87h
  5868. --------v-214B60-----------------------------
  5869. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - ???
  5870.     AX = 4B60h
  5871.     ???
  5872. Return: ???
  5873. SeeAlso: AX=4B50h
  5874. --------O-214B80-----------------------------
  5875. INT 21 - DR-DOS v3.41 - RUN ALREADY-LOADED KERNEL FILE
  5876.     AX = 4B80h
  5877.     DS:DX -> ASCIZ name of program to EXEC
  5878.     ES = segment of PSP for kernel file
  5879. Return: only if call failed
  5880. Note:    DR-DOS uses this call after an AX=4B01h to load the kernel file into
  5881.       memory and patching the program's parent-PSP field to point at itself
  5882. SeeAlso: AH=4Bh"EXEC"
  5883. --------v-214B87-----------------------------
  5884. INT 21 - VIRUS - "Shirley" - INSTALLATION CHECK
  5885.     AX = 4B87h
  5886. Return: AX = 6663h if resident
  5887. SeeAlso: AX=4B5Eh,AX=4B95h
  5888. --------v-214B95-----------------------------
  5889. INT 21 - VIRUS - "Zherkov-1882" - INSTALLATION CHECK
  5890.     AX = 4B95h
  5891. Return: AX = 1973h if resident
  5892. SeeAlso: AX=4B87h,AX=4BA7h
  5893. --------v-214BA7-----------------------------
  5894. INT 21 - VIRUS - "1876"/"Dash-em" - INSTALLATION CHECK
  5895.     AX = 4BA7h
  5896. Return: AX = B459h if resident
  5897. SeeAlso: AX=4B95h,AX=4BAAh
  5898. --------v-214BAA-----------------------------
  5899. INT 21 - VIRUS - "Nomenklatura" - INSTALLATION CHECK
  5900.     AX = 4BAAh
  5901. Return: CF clear if resident
  5902. SeeAlso: AX=4BA7h,AX=4BAFh
  5903. --------v-214BAF-----------------------------
  5904. INT 21 - VIRUS - "948"/"Screenplus1", "Magnitogorsk" - INSTALLATION CHECK
  5905.     AX = 4BAFh
  5906. Return: AL = AFh if "Magnitogorsk" resident
  5907.     AL = FAh if "948"/"Screenplus1" resident
  5908. SeeAlso: AX=4BAAh,AX=4BDDh
  5909. --------v-214BDD-----------------------------
  5910. INT 21 - VIRUS - "Lozinsky"/"Zherkov" - INSTALLATION CHECK
  5911.     AX = 4BDDh
  5912. Return: AX = 1234h
  5913. SeeAlso: AX=4BAFh,AX=4BFEh
  5914. --------v-214BEE-----------------------------
  5915. INT 21 - F-DRIVER.SYS v1.14+ - GRAB INT 21
  5916.     AX = 4BEEh
  5917. Return: AX = status
  5918.         1234h grab was successful
  5919.         2345h failed (INT 21 grabbed previously)
  5920. Program: F-DRIVER.SYS is part of the shareware F-PROT virus/trojan protection
  5921.       package by Fridrik Skulason
  5922. Note:    when called the first time, this function moves the INT 21 monitoring
  5923.       code from its original location in the INT 21 chain to be the first
  5924.       thing called by INT 21.  This is the mechanism used by F-NET.
  5925. SeeAlso: INT 2F/AX=4653h
  5926. --------k-214BF0-----------------------------
  5927. INT 21 - DIET v1.10+ (Overlay Mode) - INSTALLATION CHECK
  5928.     AX = 4BF0h
  5929. Return: CF clear if installed
  5930.         AX = 899Dh
  5931. Program: DIET is an executable-compression program by Teddy Matsumoto
  5932. SeeAlso: AX=37D0h,AX=4BF1h
  5933. --------k-214BF1-----------------------------
  5934. INT 21 - DIET v1.10+ (Overlay Mode) - EXPAND PROGRAM???
  5935.     AX = 4BF1h
  5936. Return: ???
  5937. SeeAlso: AX=37D0h,AX=4BF0h
  5938. --------v-214BF1-----------------------------
  5939. INT 21 - VIRUS - "Jerusalem 2" - INSTALLATION CHECK
  5940.     AX = 4BF1h
  5941. Return: AX = 1FB4h if resident
  5942. SeeAlso: AH=3Fh/BX=FEB0h"VIRUS",AX=4BDDh"VIRUS",AX=4BFEh"VIRUS"
  5943. --------v-214BFE-----------------------------
  5944. INT 21 - VIRUS - "Hitchcock", "Dark Avenger-1028", "1193" - INSTALLATION CHECK
  5945.     AX = 4BFEh
  5946. Return: AX = 1234h if "Hitchcock" or "Storm" resident
  5947.     AX = ABCDh if "1193"/"Copyright" resident
  5948.     DI = 55BBh if "Dark Avenger-1028" resident
  5949. SeeAlso: AX=4BDDh,AX=4BF1h"VIRUS",AX=4BFFh"Justice"
  5950. --------v-214BFF-----------------------------
  5951. INT 21 - VIRUS - "USSR-707", "Justice", "Europe 92" - INSTALLATION CHECK
  5952.     AX = 4BFFh
  5953. Return: BL = FFh if "USSR-707" resident
  5954.     DI = 55AAh if "Justice" resident
  5955.     AX = 1234h if "Hitchcock.1238" resident
  5956.     CF clear if "Europe 92" resident
  5957. SeeAlso: AX=4BFEh,AX=4BFFh"Cascade",AX=5252h
  5958. --------v-214BFFSI0000-----------------------
  5959. INT 21 - VIRUS - "Cascade" - INSTALLATION CHECK
  5960.     AX = 4BFFh
  5961.     SI = 0000h
  5962.     DI = 0000h
  5963. Return: DI = 55AAh if installed
  5964. SeeAlso: AX=4BFFh"Justice",AX=5252h
  5965. --------D-214C-------------------------------
  5966. INT 21 - DOS 2+ - "EXIT" - TERMINATE WITH RETURN CODE
  5967.     AH = 4Ch
  5968.     AL = return code
  5969. Return: never returns
  5970. Notes:    unless the process is its own parent
  5971.       (see #0725 [offset 16h] at AH=26h), all open files are closed and
  5972.       all memory belonging to the process is freed
  5973.     all network file locks should be removed before calling this function
  5974. SeeAlso: AH=00h,AH=26h,AH=4Bh,AH=4Dh,INT 15/AH=12h/BH=02h,INT 20,INT 22
  5975. SeeAlso: INT 60/DI=0601h
  5976. --------m-214C57-----------------------------
  5977. INT 21 - Headroom - ???
  5978.     AX = 4C57h
  5979.     DS:DX -> target address
  5980. Note:    jumps to target address instead of terminating program
  5981. SeeAlso: AX=5758h
  5982. --------D-214D-------------------------------
  5983. INT 21 - DOS 2+ - GET RETURN CODE (ERRORLEVEL)
  5984.     AH = 4Dh
  5985. Return: AH = termination type
  5986.         00h normal (INT 20,INT 21/AH=00h, or INT 21/AH=4Ch)
  5987.         01h control-C abort
  5988.         02h critical error abort
  5989.         03h terminate and stay resident (INT 21/AH=31h or INT 27)
  5990.     AL = return code
  5991. Notes:    the word in which DOS stores the return code is cleared after being
  5992.       read by this function, so the return code can only be retrieved once
  5993.     COMMAND.COM stores the return code of the last external command it
  5994.       executed as ERRORLEVEL
  5995.     this call should not be used if the child was started with AX=4B04h;
  5996.       use AH=8Ah instead
  5997.     the following sequence will close a Virtual DOS Machine under OS/2 2.0
  5998.       through OS/2 Merlin (but may change in the future):
  5999.         MOV    AH,4Dh
  6000.         INT    21h
  6001.         HLT
  6002.         DB    02h,0FDh
  6003.       This sequence is the only way to close a specific VDM which was
  6004.       booted from floppy or a disk image.
  6005. SeeAlso: AH=4Bh,AH=4Ch,AH=8Ah
  6006. --------D-214E-------------------------------
  6007. INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE
  6008.     AH = 4Eh
  6009.     AL = special flag for use by APPEND (refer to note below)
  6010.     CX = file attribute mask (see #0765 at AX=4301h) (bits 0 and 5 ignored)
  6011.         0088h (Novell DOS 7) find first deleted file
  6012.     DS:DX -> ASCIZ file specification (may include path and wildcards)
  6013. Return: CF clear if successful
  6014.         Disk Transfer Area filled with FindFirst data block (see #0967)
  6015.     CF set on error
  6016.         AX = error code (02h,03h,12h) (see #1020 at AH=59h/BX=0000h)
  6017. Notes:    for search attributes other than 08h, all files with at MOST the
  6018.       specified combination of hidden, system, and directory attributes
  6019.       will be returned.  Under DOS 2.x, searching for attribute 08h
  6020.       (volume label) will also return normal files, while under DOS 3.0+
  6021.       only the volume label (if any) will be returned.
  6022.     this call also returns successfully if given the name of a character
  6023.       device without wildcards.  DOS 2.x returns attribute 00h, size 0,
  6024.       and the current date and time.  DOS 3.0+ returns attribute 40h and
  6025.       the current date and time.
  6026.     immediately after an INT 2F/AX=B711h (APPEND return found name), the
  6027.       name at DS:DX will be overwritten; if AL=00h on entry, the actual
  6028.       found pathname will be stored, otherwise, the actual found path
  6029.       will be prepended to the original filespec without a path.
  6030.     under LANtastic, this call may be used to obtain a list of a server's
  6031.       shared resources by searching for "\\SERVER\*.*"; a list of printer
  6032.       resources may be obtained by searching for "\\SERVER\@*.*"
  6033.     under the FlashTek X-32 DOS extender, the filespec pointer is in DS:EDX
  6034. BUGS:    under DOS 3.x and 4.x, the second and subsequent calls to this function
  6035.       with a character device name (no wildcards) and search attributes
  6036.       which include the volume-label bit (08h) will fail unless there is
  6037.       an intervening DOS call which implicitly or explicity performs a
  6038.       directory search without the volume-label bit.  Such implicit
  6039.       searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK
  6040.       (AH=41h), and RENAME (AH=56h)
  6041.     DR DOS 3.41 and 5.0 return the Directory attribute for the volume label
  6042. SeeAlso: AH=11h,AH=4Fh,AX=4301h,AX=714Eh,AX=71A1h,AX=F257h/SF=02h
  6043. SeeAlso: INT 2F/AX=111Bh,INT 2F/AX=B711h
  6044.  
  6045. Format of FindFirst data block:
  6046. Offset    Size    Description    (Table 0967)
  6047. ---PC-DOS 3.10, PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  6048.  00h    BYTE    drive letter (bits 0-6), remote if bit 7 set
  6049.  01h 11 BYTEs    search template
  6050.  0Ch    BYTE    search attributes
  6051. ---DOS 2.x (and some DOS 3.x???)---
  6052.  00h    BYTE    search attributes
  6053.  01h    BYTE    drive letter
  6054.  02h 11 BYTEs    search template
  6055. ---WILDUNIX.COM---
  6056.  00h 12 BYTEs    15-character wildcard search pattern and drive letter (packed)
  6057.  0Ch    BYTE    search attributes
  6058. ---DOS 2.x and most 3.x---
  6059.  0Dh    WORD    entry count within directory
  6060.  0Fh    DWORD    pointer to DTA???
  6061.  13h    WORD    cluster number of start of parent directory
  6062. ---PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  6063.  0Dh    WORD    entry count within directory
  6064.  0Fh    WORD    cluster number of start of parent directory
  6065.  11h  4 BYTEs    reserved
  6066. ---OS/2 MVDM---
  6067.  00h    WORD    "OS2_BMP_handle"
  6068.  02h    WORD    "OS2_LastEnt"
  6069.  04h    DWORD    "OS2_Checksum"
  6070.  08h    BYTE    "OS2_usi_flag"
  6071.  09h    DWORD    used by DOS emulator for second pass for volume-label searches
  6072.  0Dh    WORD    (ret) "DOS_LastEnt" entry count within directory
  6073.  0Fh    BYTE    OS/2 Processed-FindFirst flag
  6074.         00h FindFirst processed by DOS
  6075.         42h FindFirst processed by OS/2
  6076.  10h  5 BYTEs    reserved for future use
  6077. ---all versions, documented fields---
  6078.  15h    BYTE    attribute of file found
  6079.  16h    WORD    file time (see #1005 at AX=5700h)
  6080.  18h    WORD    file date (see #1006 at AX=5700h)
  6081.  1Ah    DWORD    file size
  6082.  1Eh 13 BYTEs    ASCIZ filename+extension
  6083. --------f-214E-------------------------------
  6084. INT 21 - WILDUNIX.COM internal - INSTALLATION CHECK
  6085.     AH = 4Eh
  6086.     DS:DX = 0000h:0000h
  6087. Return: AH = 99h if installed
  6088. Program: WILDUNIX.COM is a resident Unix-style wildcard expander by Steve
  6089.       Hosgood and Terry Barnaby
  6090. --------D-214F-------------------------------
  6091. INT 21 - DOS 2+ - "FINDNEXT" - FIND NEXT MATCHING FILE
  6092.     AH = 4Fh
  6093.     Disk Transfer Area contains data block from previous FindFirst or
  6094.       FindNext call
  6095. Return: CF clear if successful
  6096.         Disk Transfer Area updated
  6097.     CF set on error
  6098.         AX = error code (12h) (see #1020 at AH=59h/BX=0000h)
  6099. Notes:    under Novell DOS 7, if the FindFirst call (AH=4Eh) had CX=0088h, then
  6100.       the next matching deleted file will be returned
  6101.     since the entire state of a FindFirst/FindNext sequence is contained
  6102.       in the data block in the DTA, other disk operations such as renaming,
  6103.       moving, deleting, or creating files can cause inaccurate directory
  6104.       searches, such as finding the same file twice
  6105. BUG:    DR DOS 3.41 and 5.0 return the Directory attribute for the volume label
  6106. SeeAlso: AH=12h,AH=4Eh,AX=714Fh,AX=71A1h
  6107. --------D-2150-------------------------------
  6108. INT 21 - DOS 2+ internal - SET CURRENT PROCESS ID (SET PSP ADDRESS)
  6109.     AH = 50h
  6110.     BX = segment of PSP for new process
  6111. Notes:    DOS uses the current PSP address to determine which processes own files
  6112.       and memory; it corresponds to process identifiers used by other OSs
  6113.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  6114.       handler without setting the Critical Error flag
  6115.     under MS-DOS 3.0+ and DR DOS 3.41+, this function does not use any of
  6116.       the DOS-internal stacks and may thus be called at any time, even
  6117.       during another INT 21h call
  6118.     some Microsoft applications such as Quick C 2.51 use segments of 0000h
  6119.       and FFFFh and direct access to the SDA (see #1027 at AX=5D06h) to
  6120.       test whether they are running under MS-DOS rather than a compatible
  6121.       OS; although one should only call this function with valid PSP
  6122.       addresses, any program hooking it should be prepared to handle
  6123.       invalid addresses
  6124.     this function is supported by the OS/2 compatibility box
  6125.     this call was undocumented prior to the release of DOS 5.0
  6126. SeeAlso: AH=26h,AH=51h,AH=62h
  6127. --------v-2150FD-----------------------------
  6128. INT 21 - VIRUS - "Predator 2" - INSTALLATION CHECK
  6129.     AX = 50FDh
  6130. Return: AX = FD50h if resident
  6131. SeeAlso: AX=4BFFh"VIRUS",AX=5454h"VIRUS"
  6132. --------D-2151-------------------------------
  6133. INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
  6134.     AH = 51h
  6135. Return: BX = segment of PSP for current process
  6136. Notes:    DOS uses the current PSP address to determine which processes own files
  6137.       and memory; it corresponds to process identifiers used by other OSs
  6138.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  6139.       handler without setting the Critical Error flag
  6140.     under DOS 3.0+, this function does not use any of the DOS-internal
  6141.       stacks and may thus be called at any time, even during another
  6142.       INT 21h call
  6143.     supported by OS/2 compatibility box
  6144.     identical to the documented AH=62h
  6145.     this call was undocumented prior to the release of DOS 5.0
  6146. SeeAlso: AH=26h,AH=50h,AH=62h
  6147. --------D-2152-------------------------------
  6148. INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
  6149.     AH = 52h
  6150. Return: ES:BX -> DOS list of lists (see #0968)
  6151. Notes:    partially supported by OS/2 v1.1 compatibility box (however, most
  6152.       pointers are FFFFh:FFFFh, LASTDRIVE is FFh, and the NUL header "next"
  6153.       pointer is FFFFh:FFFFh).
  6154.     partially supported by the Windows NT DOS box; contains only a
  6155.       rudimentary Current Directory Structure (see #0986)
  6156.     on return, ES points at the DOS data segment (see also INT 2F/AX=1203h)
  6157.     Quarterdeck's suggested check for the use of its DOSDATA.SYS or
  6158.       DOS-UP.SYS is to test whether the list-of-lists segment is greater
  6159.       than the segment of the first memory block; a better check for
  6160.       DOS-UP.SYS is INT 21/AX=2B01h/CX=444Dh
  6161.     because not all DOS workalikes support all fields in the List of Lists,
  6162.       applications should ensure that pointers are neither 0000h:0000h
  6163.       nor FFFFh:FFFFh before using them
  6164. SeeAlso: INT 2F/AX=1203h
  6165.  
  6166. Format of List of Lists:
  6167. Offset    Size    Description    (Table 0968)
  6168.  -24    WORD    (DOS 3.1+) contents of CX from INT 21/AX=5E01h
  6169.  -22    WORD    (DOS ???+) LRU counter for FCB caching
  6170.  -20    WORD    (DOS ???+) LRU counter for FCB opens
  6171.  -18    DWORD    (DOS ???+) address of OEM function handler (see INT 21/AH=F8h)
  6172.             FFFFh:FFFFh if not installed or not available
  6173.  -14    WORD    (DOS ???+) offset in DOS CS of code to return from INT 21 call
  6174.  -12    WORD    (DOS 3.1+) sharing retry count (see AX=440Bh)
  6175.  -10    WORD    (DOS 3.1+) sharing retry delay (see AX=440Bh)
  6176.  -8    DWORD    (DOS 3.0+) pointer to current disk buffer
  6177.  -4    WORD    (DOS 3.0+) pointer in DOS data segment of unread CON input
  6178.         when CON is read via a handle, DOS reads an entire line,
  6179.           and returns the requested portion, buffering the rest
  6180.           for the next read.  0000h indicates no unread input
  6181.  -2    WORD    segment of first memory control block (see #0969)
  6182.  00h    DWORD    pointer to first Drive Parameter Block (see #0742 at AH=32h)
  6183.  04h    DWORD    -> first System File Table (see #0980,#0981,#0982,#0983)
  6184.  08h    DWORD    pointer to active CLOCK$ device's header (most recently loaded
  6185.           driver with CLOCK bit set)
  6186.  0Ch    DWORD    pointer to active CON device's header (most recently loaded
  6187.           driver with STDIN bit set)
  6188. ---DOS 2.x---
  6189.  10h    BYTE    number of logical drives in system
  6190.  11h    WORD    maximum bytes/block of any block device
  6191.  13h    DWORD    pointer to first disk buffer (see #0990,#0991)
  6192.  17h 18 BYTEs    actual NUL device driver header (not a pointer!)
  6193.         NUL is always the first device on DOS's linked list of device
  6194.           drivers. (see #0987)
  6195. ---DOS 3.0---
  6196.  10h    BYTE    number of block devices
  6197.  11h    WORD    maximum bytes/block of any block device
  6198.  13h    DWORD    pointer to first disk buffer (see #0991,#0993)
  6199.  17h    DWORD    pointer to array of current directory structures (see #0984)
  6200.  1Bh    BYTE    value of LASTDRIVE command in CONFIG.SYS (default 5)
  6201.  1Ch    DWORD    pointer to STRING= workspace area
  6202.  20h    WORD    size of STRING area (the x in STRING=x from CONFIG.SYS)
  6203.  22h    DWORD    pointer to FCB table
  6204.  26h    WORD    the y in FCBS=x,y from CONFIG.SYS
  6205.  28h 18 BYTEs    actual NUL device driver header (not a pointer!)
  6206.         NUL is always the first device on DOS's linked list of device
  6207.           drivers. (see #0987)
  6208. ---DOS 3.1-3.3---
  6209.  10h    WORD    maximum bytes per sector of any block device
  6210.  12h    DWORD    pointer to first disk buffer in buffer chain (see #0991)
  6211.  16h    DWORD    pointer to array of current directory structures (see #0984)
  6212.  1Ah    DWORD    pointer to system FCB tables (see #0981,#0982,#0983)
  6213.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  6214.  20h    BYTE    number of block devices installed
  6215.  21h    BYTE    number of available drive letters (largest of 5, installed
  6216.           block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  6217.           current directory structure array.
  6218.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  6219.         NUL is always the first device on DOS's linked list of device
  6220.           drivers. (see #0987)
  6221.  34h    BYTE    number of JOIN'ed drives
  6222. ---DOS 4.x---
  6223.  10h    WORD    maximum bytes per sector of any block device
  6224.  12h    DWORD    pointer to disk buffer info record (see #0993,#0994)
  6225.         Note: although the initialization code in IO.SYS uses this
  6226.           pointer, MSDOS.SYS does not, instead using the hardcoded
  6227.           address of the info record
  6228.  16h    DWORD    pointer to array of current directory structures
  6229.         (see #0984,#0985)
  6230.  1Ah    DWORD    pointer to system FCB tables (see #0981,#0982,#0983)
  6231.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  6232.         (always 00h for DOS 5.0)
  6233.  20h    BYTE    number of block devices installed
  6234.  21h    BYTE    number of available drive letters (largest of 5, installed
  6235.           block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  6236.           current directory structure array.
  6237.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  6238.         NUL is always the first device on DOS's linked list of device
  6239.           drivers. (see #0987)
  6240.  34h    BYTE    number of JOIN'ed drives
  6241.  35h    WORD    pointer within IBMDOS code segment to list of special program
  6242.           names (see #1003)
  6243.         (always 0000h for DOS 5.0)
  6244.  37h    DWORD    pointer to FAR routine for resident IFS utility functions
  6245.         (see #0999)
  6246.         may be called by any IFS driver which does not wish to
  6247.           service functions 20h or 24h-28h itself
  6248.  3Bh    DWORD    pointer to chain of IFS (installable file system) drivers
  6249.  3Fh    WORD    the x in BUFFERS x,y (rounded up to multiple of 30 if in EMS)
  6250.  41h    WORD    number of lookahead buffers (the y in BUFFERS x,y)
  6251.  43h    BYTE    boot drive (1=A:)
  6252.  44h    BYTE    flag: 01h to use DWORD moves (80386+), 00h otherwise
  6253.  45h    WORD    extended memory size in KB
  6254. ---DOS 5.0-6.0---
  6255.  10h 39 BYTEs    as for DOS 4.x (above)
  6256.  37h    DWORD    pointer to SETVER program list or 0000h:0000h
  6257.  3Bh    WORD    (DOS=HIGH) offset in DOS CS of function to fix A20 control
  6258.           when executing special .COM format
  6259.  3Dh    WORD    PSP of most-recently EXECed program if DOS in HMA, 0000h if low
  6260.         used for maintaining count of INT 21 calls which disable A20
  6261.           on return
  6262.  3Fh  8 BYTEs    as for DOS 4.x (above)
  6263. ---Windows NT DOS Box---
  6264.  10h  6 BYTEs    ???
  6265.  16h    DWORD    pointer to array of current directory structures (see #0986)
  6266.  1Ah  6 BYTEs    ???
  6267.  20h    BYTE    number of block devices installed
  6268.  21h    BYTE    number of local drive letters (= installed block devices)
  6269.         Also size of current directory structure array.
  6270.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  6271.         NUL is always the first device on DOS's linked list of device
  6272.           drivers. (see #0987)
  6273.  
  6274. Format of DOS memory control block:
  6275. Offset    Size    Description    (Table 0969)
  6276.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  6277.  01h    WORD    PSP segment of owner or special flag value (see #0970)
  6278.  03h    WORD    size of memory block in paragraphs
  6279.  05h  3 BYTEs    unused by MS-DOS
  6280.         (386MAX) if locked-out block, region start/prev region end
  6281. ---DOS 2.x,3.x---
  6282.  08h  8 BYTEs    unused
  6283. ---DOS 4.0+ ---
  6284.  08h  8 BYTEs    ASCII program name if PSP memory block or DR DOS UMB,
  6285.           else garbage
  6286.         null-terminated if less than 8 characters
  6287. Notes:    the next MCB is at segment (current + size + 1)
  6288.     under DOS 3.1+, the first memory block is the DOS data segment,
  6289.       containing installable drivers, buffers, etc.     Under DOS 4.0+ it is
  6290.       divided into subsegments, each with its own memory control block
  6291.       (see #0974), the first of which is at offset 0000h.
  6292.     for DOS 5+, blocks owned by DOS may have either "SC" or "SD" in bytes
  6293.       08h and 09h.    "SC" is system code or locked-out inter-UMB memory,
  6294.       "SD" is system data, device drivers, etc.
  6295.     Some versions of DR DOS use only seven characters of the program name,
  6296.       placing a NUL in the eighth byte.
  6297. SeeAlso: #0971,#0973,#0974
  6298.  
  6299. (Table 0970)
  6300. Values for special flag PSP segments:
  6301.  0000h    free
  6302.  0006h    DR DOS XMS UMB
  6303.  0007h    DR DOS excluded upper memory ("hole")
  6304.  0008h    belongs to DOS
  6305.  FFF7h    386MAX v6.01+ ???
  6306.  FFFAh    386MAX UMB control block (see #0819 at AX=4402h"386MAX")
  6307.  FFFDh    386MAX locked-out memory
  6308.  FFFEh    386MAX UMB (normally immediately follows its control block)
  6309.  FFFFh    386MAX v6.01+ device driver
  6310.  
  6311. Format of MS-DOS 5+ UMB control block:
  6312. Offset    Size    Description    (Table 0971)
  6313.  00h    BYTE    type: 5Ah if last block in chain, 4Dh otherwise
  6314.  01h    WORD    first available paragraph in UMB if control block at start
  6315.           of UMB, 000Ah if control block at end of UMB
  6316.  03h    WORD    length in paragraphs of following UMB or locked-out region
  6317.  05h  3 BYTEs    unused
  6318.  08h  8 BYTEs    block type name: "UMB" if start block, "SM" if end block in UMB
  6319. SeeAlso: #0969,#0972
  6320.  
  6321. Format of MS-DOS 7.0 HMA memory control block:
  6322. Offset    Size    Description    (Table 0972)
  6323.  00h    WORD    signature "MS" (4Dh 53h)
  6324.  02h    WORD    usage flag???
  6325.         0000h free
  6326.         else ???
  6327.  04h    WORD    size of memory block in bytes (not counting MCB)
  6328.  06h    WORD    offset of next memory block in HMA or 0000h
  6329.  08h  8 BYTEs    unused (0)
  6330. SeeAlso: #0969,#0971,#0973
  6331.  
  6332. Format of STARLITE (General Software's Embedded DOS) memory control block:
  6333. Offset    Size    Description    (Table 0973)
  6334.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  6335.  01h    WORD    PSP segment of owner, 0000h if free, 0008h if belongs to DOS
  6336.  03h    WORD    size of memory block in paragraphs
  6337.  05h    BYTE    unused
  6338.  06h    WORD    segment address of next memory control block (0000h if last)
  6339.  08h    WORD    segment address of previous memory control block or 0000h
  6340.  0Ah  6 BYTEs    reserved
  6341.  
  6342. Format of DOS 4.0+ data segment subsegment control blocks:
  6343. Offset    Size    Description    (Table 0974)
  6344.  00h    BYTE    subsegment type (blocks typically appear in this order)
  6345.         "D"  device driver
  6346.         "E"  device driver appendage
  6347.         "I"  IFS (Installable File System) driver
  6348.         "F"  FILES=  control block storage area (for FILES>5)
  6349.         "X"  FCBS=   control block storage area, if present
  6350.         "C"  BUFFERS EMS workspace area (if BUFFERS /X option used)
  6351.         "B"  BUFFERS=  storage area
  6352.         "L"  LASTDRIVE=     current directory structure array storage area
  6353.         "S"  STACKS=  code and data area, if present (see #0975,#0976)
  6354.         "T"  INSTALL= transient code
  6355.  01h    WORD    paragraph of subsegment start (usually the next paragraph)
  6356.  03h    WORD    size of subsegment in paragraphs
  6357.  05h  3 BYTEs    unused
  6358.  08h  8 BYTEs    for types "D" and "I", base name of file from which the driver
  6359.           was loaded (unused for other types)
  6360.  
  6361. Format of data at start of STACKS code segment (if present):
  6362. Offset    Size    Description    (Table 0975)
  6363.  00h    WORD    ???
  6364.  02h    WORD    number of stacks (the x in STACKS=x,y)
  6365.  04h    WORD    size of stack control block array (should be 8*x)
  6366.  06h    WORD    size of each stack (the y in STACKS=x,y)
  6367.  08h    DWORD    pointer to STACKS data segment
  6368.  0Ch    WORD    offset in STACKS data segment of stack control block array
  6369.  0Eh    WORD    offset in STACKS data segment of last element of that array
  6370.  10h    WORD    offset in STACKS data segment of the entry in that array for
  6371.           the next stack to be allocated (initially same as value in
  6372.           0Eh and works its way down in steps of 8 to the value in
  6373.           0Ch as hardware interrupts pre-empt each other)
  6374. Note:    the STACKS code segment data may, if present, be located as follows:
  6375.     DOS 3.2:    The code segment data is at a paragraph boundary fairly early
  6376.           in the IBMBIO segment (seen at 0070:0190h)
  6377.     DOS 3.3:    The code segment is at a paragraph boundary in the DOS data
  6378.           segment, which may be determined by inspecting the segment
  6379.           pointers of the vectors for those of interrupts 02h, 08h-0Eh,
  6380.           70h, 72-77h which have not been redirected by device drivers
  6381.           or TSRs.
  6382.     DOS 4.0+    Identified by sub-segment control block type "S" within the DOS
  6383.           data segment.
  6384. SeeAlso: #0977,INT B4"STACKMAN"
  6385.  
  6386. Format of array elements in STACKS data segment:
  6387. Offset    Size    Description    (Table 0976)
  6388.  00h    BYTE    status: 00h=free, 01h=in use, 03h=corrupted by overflow of
  6389.           higher stack.
  6390.  01h    BYTE    not used
  6391.  02h    WORD    previous SP
  6392.  04h    WORD    previous SS
  6393.  06h    WORD    ptr to word at top of stack (new value for SP). The word at the
  6394.           top of the stack is preset to point back to this control
  6395.           block.
  6396.  
  6397. Format of SHARE.EXE hooks (DOS 3.1-6.00):
  6398. Offset    Size    Description    (Table 0977)
  6399. (offsets from first system file table--pointed at by ListOfLists+04h)
  6400. -3Ch    DWORD    pointer to FAR routine for ???
  6401.         Note: not called by MS-DOS 3.3, set to 0000h:0000h by
  6402.             SHARE 3.3+
  6403. -38h    DWORD    pointer to FAR routine called on opening file
  6404.         on call, internal DOS location points at filename
  6405.           (see #1027 at AX=5D06h)
  6406.         Return: CF clear if successful
  6407.             CF set on error
  6408.                 AX = DOS error code (24h)
  6409.                   (see #1020 at AH=59h/BX=0000h)
  6410.         Note: SHARE directly accesses DOS-internal data to get name of
  6411.             file just opened
  6412. -34h    DWORD    pointer to FAR routine called on closing file
  6413.         ES:DI -> system file table
  6414.         Note: does something to every Record Lock Record for file
  6415. -30h    DWORD    pointer to FAR routine to close all files for given computer
  6416.         (called by AX=5D03h)
  6417. -2Ch    DWORD    pointer to FAR routine to close all files for given process
  6418.         (called by AX=5D04h)
  6419. -28h    DWORD    pointer to FAR routine to close file by name
  6420.         (called by AX=5D02h)
  6421.         DS:SI -> DOS parameter list (see #1026 at AX=5D00h)
  6422.            DPL's DS:DX -> name of file to close
  6423.         Return: CF clear if successful
  6424.             CF set on error
  6425.                 AX = DOS error code (03h)
  6426.                   (see #1020 at AH=59h/BX=0000h)
  6427. -24h    DWORD    pointer to FAR routine to lock region of file
  6428.         call with BX = file handle
  6429.               ---DOS 3.x---
  6430.               CX:DX = starting offset
  6431.               SI:AX = size
  6432.               ---DOS 4.0+ ---
  6433.               DS:DX -> lock range
  6434.                     DWORD start offset
  6435.                     DWORD size in bytes
  6436.         Return: CF set on error
  6437.                 AL = DOS error code (21h) (see #1020 at AH=59h)
  6438.         Note: not called if file is marked as remote
  6439. -20h    DWORD    pointer to FAR routine to unlock region of file
  6440.         call with BX = file handle
  6441.               ---DOS 3.x---
  6442.               CX:DX = starting offset
  6443.               SI:AX = size
  6444.               ---DOS 4.0+ ---
  6445.               DS:DX -> lock range
  6446.                     DWORD start offset
  6447.                     DWORD size in bytes
  6448.         Return: CF set on error
  6449.                 AL = DOS error code (21h) (see #1020 at AH=59h)
  6450.         Note: not called if file is marked as remote
  6451. -1Ch    DWORD    pointer to FAR routine to check if file region is locked
  6452.         call with ES:DI -> system file table entry for file
  6453.             CX = length of region from current position in file
  6454.         Return: CF set if any portion of region locked
  6455.                 AX = 0021h
  6456. -18h    DWORD    pointer to FAR routine to get open file list entry
  6457.         (called by AX=5D05h)
  6458.         call with DS:SI -> DOS parameter list (see #1026 at AX=5D00h)
  6459.             DPL's BX = index of sharing record
  6460.             DPL's CX = index of SFT in SFT chain of sharing rec
  6461.         Return: CF set on error or not loaded
  6462.                 AX = DOS error code (12h) (see #1020 at AH=59h)
  6463.             CF clear if successful
  6464.                 ES:DI -> filename
  6465.                 CX = number of locks owned by specified SFT
  6466.                 BX = network machine number
  6467.                 DX destroyed
  6468. -14h    DWORD    pointer to FAR routine for updating FCB from SFT???
  6469.         call with DS:SI -> unopened FCB
  6470.               ES:DI -> system file table entry
  6471.         Return: BL = C0h???
  6472.         Note: copies following fields from SFT to FCB:
  6473.            starting cluster of file      0Bh     1Ah
  6474.            sharing record offset      33h     1Ch
  6475.            file attribute          04h     1Eh
  6476. -10h    DWORD    pointer to FAR routine to get first cluster of FCB file ???
  6477.         call with ES:DI -> system file table entry
  6478.               DS:SI -> FCB
  6479.         Return: CF set if SFT closed or sharing record offsets
  6480.                 mismatched
  6481.             CF clear if successful
  6482.                 BX = starting cluster number from FCB
  6483. -0Ch    DWORD    pointer to FAR routine to close file if duplicate for process
  6484.         DS:SI -> system file table
  6485.         Return: AX = number of handle in JFT which already uses SFT
  6486.         Note: called during open/create of a file
  6487.         Note: if SFT was opened with inheritance enabled and sharing
  6488.             mode 111, does something to all other SFTs owned by
  6489.             same process which have the same file open mode and
  6490.             sharing record
  6491. -08h    DWORD    pointer to FAR routine for closing file
  6492.         Note: closes various handles referring to file most-recently
  6493.             opened
  6494. -04h    DWORD    pointer to FAR routine to update directory info in related SFT
  6495.           entries
  6496.         call with ES:DI -> system file table entry for file (see #0982)
  6497.               AX = subfunction (apply to each related SFT)
  6498.                 00h: update time stamp (offset 0Dh) and date
  6499.                      stamp (offset 0Fh)
  6500.                 01h: update file size (offset 11h) and starting
  6501.                      cluster (offset 0Bh).  Sets last-accessed
  6502.                      cluster fields to start of file if file
  6503.                      never accessed
  6504.                 02h: as function 01h, but last-accessed fields
  6505.                      always changed
  6506.                 03h: do both functions 00h and 02h
  6507.         Note: follows ptr at offset 2Bh in system file table entries
  6508.         Note: NOP if opened with no-inherit or via FCB
  6509. Notes:    most of the above hooks (except -04h, -14h, -18h, and -3Ch) assume
  6510.       either that SS=DOS DS or SS=DS=DOS DS and directly access
  6511.       DOS-internal data
  6512.     sharing hooks are not supported by DR DOS 5-6; they appear to be
  6513.       supported by Novell DOS 7, with a segment of 0000h indicating the
  6514.       DOS data segment
  6515. SeeAlso: #0978,#0979
  6516.  
  6517. Format of sharing record:
  6518. Offset    Size    Description    (Table 0978)
  6519.  00h    BYTE    flag
  6520.         00h free block
  6521.         01h allocated block
  6522.         FFh end marker
  6523.  01h    WORD    size of block
  6524.  03h    BYTE    checksum of pathname (including NUL)
  6525.         if sum of ASCII values is N, checksum is (N/256 + N%256)
  6526.  04h    WORD    offset in SHARE's DS of first Record Lock Record (see #0979)
  6527.  06h    DWORD    pointer to start of system file table chain for file
  6528.  0Ah    WORD    unique sequence number
  6529.  0Ch    var    ASCIZ full pathname
  6530. Note:    not supported by DR DOS SHARE 1.1 and 2.0; will reportedly be
  6531.       supported by Novell DOS 7
  6532. SeeAlso: #0977,#0979
  6533.  
  6534. Format of SHARE.EXE Record Lock Record:
  6535. Offset    Size    Description    (Table 0979)
  6536.  00h    WORD    offset in SHARE's DS of next lock table in list or 0000h
  6537.  02h    DWORD    offset in file of start of locked region
  6538.  06h    DWORD    offset in file of end of locked region
  6539.  0Ah    DWORD    pointer to System File Table entry for this file
  6540.  0Eh    WORD    PSP segment of lock's owner
  6541. ---DOS 5+ ---
  6542.  10h    WORD    lock type: (00h lock all, 01h lock writes only)
  6543. SeeAlso: #0977,#0978,#0980,#0983
  6544.  
  6545. Format of DOS 2.x system file tables:
  6546. Offset    Size    Description    (Table 0980)
  6547.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6548.  04h    WORD    number of files in this table
  6549.  06h  28h bytes per file
  6550.     Offset    Size    Description
  6551.      00h    BYTE    number of file handles referring to this file
  6552.      01h    BYTE    file open mode (see #0749 at AH=3Dh)
  6553.      02h    BYTE    file attribute
  6554.      03h    BYTE    drive (0 = character device, 1 = A, 2 = B, etc)
  6555.      04h 11 BYTEs    filename in FCB format (no path,no period,blank-padded)
  6556.      0Fh    WORD    ???
  6557.      11h    WORD    ???
  6558.      13h    DWORD    file size???
  6559.      17h    WORD    file date in packed format (see #1006 at AX=5700h)
  6560.      19h    WORD    file time in packed format (see #1005 at AX=5700h)
  6561.      1Bh    BYTE    device attribute (see #0768 at AX=4400h)
  6562.     ---character device---
  6563.      1Ch    DWORD    pointer to device driver
  6564.     ---block device---
  6565.      1Ch    WORD    starting cluster of file
  6566.      1Eh    WORD    relative cluster in file of last cluster accessed
  6567.     ------
  6568.      20h    WORD    absolute cluster number of current cluster
  6569.      22h    WORD    ???
  6570.      24h    DWORD    current file position???
  6571. SeeAlso: #0981,#0982,#0983
  6572.  
  6573. Format of DOS 3.0 system file tables and FCB tables:
  6574. Offset    Size    Description    (Table 0981)
  6575.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6576.  04h    WORD    number of files in this table
  6577.  06h  38h bytes per file
  6578.     Offset    Size    Description
  6579.      00h-1Eh as for DOS 3.1+ (see #0982)
  6580.      1Fh    WORD    byte offset of directory entry within sector
  6581.      21h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  6582.      2Ch    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  6583.      30h    WORD    (SHARE.EXE) network machine number which opened file
  6584.             (Windows Enhanced mode DOSMGR uses the virtual machine
  6585.               ID as the machine number; see INT 2F/AX=1683h)
  6586.      32h    WORD    PSP segment of file's owner (first three entries for
  6587.               AUX/CON/PRN contain segment of IO.SYS startup code)
  6588.      34h    WORD    (SHARE.EXE) offset in SHARE code seg of share record
  6589.      36h    WORD    ??? apparently always 0000h
  6590. SeeAlso: #0980,#0982,#0983
  6591.  
  6592. Format of DOS 3.1-3.3x, DR DOS 5.0-6.0 system file tables and FCB tables:
  6593. Offset    Size    Description    (Table 0982)
  6594.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6595.  04h    WORD    number of files in this table
  6596.  06h  35h bytes per file
  6597.     Offset    Size    Description
  6598.      00h    WORD    number of file handles referring to this file
  6599.      02h    WORD    file open mode (see AX=6C00h, #0749 at AH=3Dh)
  6600.             bit 15 set if this file opened via FCB
  6601.      04h    BYTE    file attribute (see #0765 at AX=4301h)
  6602.      05h    WORD    device info word (see #0768 at AX=4400h)
  6603.             bit 15 set if remote file
  6604.             bit 14 set means do not set file date/time on closing
  6605.             bit 12 set means don't inherit on EXEC
  6606.             bits 5-0 drive number for disk files
  6607.      07h    DWORD    pointer to device driver header if character device
  6608.             else pointer to DOS Drive Parameter Block
  6609.               (see #0742 at AH=32h)
  6610.      0Bh    WORD    starting cluster of file
  6611.      0Dh    WORD    file time in packed format (see #1005 at AX=5700h)
  6612.             not used for character devices in DR DOS
  6613.      0Fh    WORD    file date in packed format (see #1006 at AX=5700h)
  6614.             not used for character devices in DR DOS
  6615.      11h    DWORD    file size
  6616.     ---system file table---
  6617.      15h    DWORD    current offset in file (may be larger than size of
  6618.               file; INT 21/AH=42h does not check new position)
  6619.     ---FCB table---
  6620.      15h    WORD    counter for last I/O to FCB
  6621.      17h    WORD    counter for last open of FCB
  6622.             (these are separate to determine the times of the
  6623.               latest I/O and open)
  6624.     ---
  6625.      19h    WORD    relative cluster within file of last cluster accessed
  6626.      1Bh    WORD    absolute cluster number of last cluster accessed
  6627.             0000h if file never read or written???
  6628.      1Dh    WORD    number of sector containing directory entry
  6629.             (see #0700)
  6630.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  6631.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  6632.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  6633.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  6634.             (Windows Enhanced mode DOSMGR uses the virtual machine
  6635.               ID as the machine number; see INT 2F/AX=1683h)
  6636.      31h    WORD    PSP segment of file's owner (see #0725 at AH=26h)
  6637.               (first three entries for AUX/CON/PRN contain segment
  6638.               of IO.SYS startup code)
  6639.      33h    WORD    offset within SHARE.EXE code segment of
  6640.               sharing record (see #0978)  0000h = none
  6641. SeeAlso: #0980,#0981,#0983
  6642.  
  6643. Format of DOS 4.0-6.0 system file tables and FCB tables:
  6644. Offset    Size    Description    (Table 0983)
  6645.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  6646.  04h    WORD    number of files in this table
  6647.  06h  3Bh bytes per file
  6648.     Offset    Size    Description
  6649.      00h    WORD    number of file handles referring to this file
  6650.             FFFFh if in use but not referenced
  6651.      02h    WORD    file open mode (see AX=6C00h,#0749 at AH=3Dh)
  6652.             bit 15 set if this file opened via FCB
  6653.      04h    BYTE    file attribute (see #0765 at AX=4301h)
  6654.      05h    WORD    device info word (see also #0768 at AX=4400h)
  6655.             bit 15 set if remote file
  6656.             bit 14 set means do not set file date/time on closing
  6657.             bit 13 set if named pipe
  6658.             bit 12 set if no inherit
  6659.             bit 11 set if network spooler
  6660.             bit 7  set if device, clear if file (only if local)
  6661.             bits 6-0 as for AX=4400h
  6662.      07h    DWORD    pointer to device driver header if character device
  6663.             else pointer to DOS Drive Parameter Block
  6664.               (see #0742 at AH=32h) or REDIR data
  6665.      0Bh    WORD    starting cluster of file (local files only)
  6666.      0Dh    WORD    file time in packed format (see #1005)
  6667.      0Fh    WORD    file date in packed format (see #1006)
  6668.      11h    DWORD    file size
  6669.      15h    DWORD    current offset in file (SFT)
  6670.             LRU counters (FCB table, two WORDs)
  6671.     ---local file---
  6672.      19h    WORD    relative cluster within file of last cluster accessed
  6673.      1Bh    DWORD    number of sector containing directory entry
  6674.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  6675.     ---network redirector---
  6676.      19h    DWORD    pointer to REDIRIFS record
  6677.      1Dh  3 BYTEs    ???
  6678.     ------
  6679.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  6680.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  6681.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  6682.             (Windows Enhanced mode DOSMGR uses the virtual machine
  6683.               ID as the machine number; see INT 2F/AX=1683h)
  6684.      31h    WORD    PSP segment of file's owner (see #0725 at AH=26h)
  6685.               (first three entries for AUX/CON/PRN contain segment
  6686.               of IO.SYS startup code)
  6687.      33h    WORD    offset within SHARE.EXE code segment of
  6688.             sharing record (see #0936)  0000h = none
  6689.      35h    WORD    (local) absolute cluster number of last clustr accessed
  6690.             (redirector) ???
  6691.      37h    DWORD    pointer to IFS driver for file, 0000000h if native DOS
  6692. Note:    the OS/2 2.0 DOS Boot Session does not properly fill in the filename
  6693.       field due to incomplete support for SFTs; the OS/2 2.0 DOS Window
  6694.       does not appear to support SFTs at all
  6695. SeeAlso: #0980,#0981,#0982
  6696.  
  6697. Format of current directory structure (CDS) (array, LASTDRIVE entries):
  6698. Offset    Size    Description    (Table 0984)
  6699.  00h 67 BYTEs    ASCIZ path in form X:\PATH (local) or UNC form
  6700.           \\SERVER\PATH (network, see notes below)
  6701.  43h    WORD    drive attributes (also see note below) (see also AX=5F07h)
  6702.         bit 15: uses network redirector     \ invalid if 00, installable
  6703.         bit 14: physical drive         / file system if 11
  6704.         bit 13: JOIN'ed      \ path above is true path that would be
  6705.         bit 12: SUBST'ed  / needed if not under SUBST or JOIN
  6706.         bit  7: remote drive hidden from redirector's assign-list and
  6707.               exempt from network connection make/break commands;
  6708.               set for CD-ROM drives by MSCDEX (not supported by
  6709.               CORELCDX)
  6710.  45h    DWORD    pointer to Drive Parameter Block for drive
  6711.           (see #0742 at AH=32h)
  6712. ---local drives---
  6713.  49h    WORD    starting cluster of current directory
  6714.         0000h = root, FFFFh = never accessed
  6715.  4Bh    WORD    ??? seems to be FFFFh always
  6716.  4Dh    WORD    ??? seems to be FFFFh always
  6717. ---network drives---
  6718.  49h    DWORD    pointer to redirector or REDIRIFS record, or FFFFh:FFFFh
  6719.         (DOS 4 only) available for use by IFS driver
  6720.  4Dh    WORD    stored user data from INT 21/AX=5F03h
  6721. ------
  6722.  4Fh    WORD    offset in current directory path of backslash corresponding to
  6723.           root directory for drive
  6724.         this value specifies how many characters to hide from the
  6725.           "CHDIR" and "GETDIR" calls; normally set to 2 to hide the
  6726.           drive letter and colon, SUBST, JOIN, and networks change it
  6727.           so that only the appropriate portion of the true path is
  6728.           visible to the user
  6729. ---DOS 4.0+ ---
  6730.  51h    BYTE    (DOS 4 only, remote drives) device type
  6731.         04h network drive
  6732.  52h    DWORD    pointer to IFS driver (DOS 4) or redirector block (DOS 5+) for
  6733.           this drive, 00000000h if native DOS
  6734.  56h    WORD    available for use by IFS driver
  6735. Notes:    the path for invalid drives is normally set to X:\, but may be empty
  6736.       after JOIN x: /D in DR DOS 5.0 or NET USE x: /D in older LAN versions
  6737.     normally, only one of bits 13&12 may be set together with bit 14, but
  6738.       DR DOS 5.0 uses other combinations for bits 15-12: 0111 JOIN,
  6739.       0001 SUBST, 0101 ASSIGN (see #0985)
  6740.     Windows for Workgroups 3.11 network sets the path to the local
  6741.       drive and directory even for network drives; in that case the
  6742.       UNC form \\SERVER\SHARE can be obtained with INT 21/AX=5F02h
  6743.       or INT 21/AX=5F46h. LapLink RemoteAccess does the same even for
  6744.       INT 21/AX=5F02h
  6745.     SoftWindows on the Macintosh PowerPC sets \\E for the host drive
  6746. SeeAlso: #0985,INT 21/AX=71AAh/BL=00h
  6747.  
  6748. Format of DR DOS 5.0-6.0 current directory structure entry (array):
  6749. Offset    Size    Description    (Table 0985)
  6750.  00h 67 BYTEs    ASCIZ pathname of actual root directory for this logical drive
  6751.  43h    WORD    drive attributes
  6752.         1000h SUBSTed drive
  6753.         3000h??? JOINed drive
  6754.         4000h physical drive
  6755.         5000h ASSIGNed drive
  6756.         7000h JOINed drive
  6757.         8000h network drive
  6758.  45h    BYTE    physical drive number (0=A:) if this logical drive is valid
  6759.  46h    BYTE    ??? apparently flags for JOIN and ASSIGN
  6760.  47h    WORD    cluster number of start of parent directory (0000h = root)
  6761.  49h    WORD    entry number of current directory in parent directory
  6762.  4Bh    WORD    cluster number of start of current directory
  6763.  4Dh    WORD    used for media change detection (details not available)
  6764.  4Fh    WORD    cluster number of SUBST/JOIN "root" directory
  6765.         0000h if physical root directory
  6766. SeeAlso: #0984
  6767.  
  6768. Format of Windows NT Current Directory Structure (CDS) (array):
  6769. Offset    Size    Description    (Table 0986)
  6770.  00h 67 BYTEs    ASCIZ path in form X:\ (does not show either current directory
  6771.           or network path)
  6772.  43h  4 BYTEs    ???
  6773. Note:    the WinNT CDS contains only as many entries as there are local drives,
  6774.       not LASTDRIVE entries.
  6775.  
  6776. Format of DOS device driver header:
  6777. Offset    Size    Description    (Table 0987)
  6778.  00h    DWORD    pointer to next driver, offset=FFFFh if last driver
  6779.  04h    WORD    device attributes (see #0988,#0989)
  6780.  06h    WORD    device strategy entry point
  6781.         call with ES:BX -> request header
  6782.           (see #1931 at INT 2F/AX=0802h)
  6783.  08h    WORD    device interrupt entry point
  6784. ---character device---
  6785.  0Ah  8 BYTEs    blank-padded character device name
  6786. ---block device---
  6787.  0Ah    BYTE    number of subunits (drives) supported by driver
  6788.  0Bh  7 BYTEs    normally unused; sometimes contains signature to indicate
  6789.           specific drivers:
  6790.         "$PCMATA"   PCMCIA driver PCMATA.SYS (see AX=440Dh"DOS 3.2+")
  6791.         "AHADDVR"   Adaptec SCSI disk driver ASPIDISK.SYS
  6792.         "DBLSPAC"   MS DoubleSpace or DriveSpace
  6793.         "DSKREET"   NortonUtils v5+ Diskreet (see INT 2F/AX=FE00h)
  6794.         "GFS    "   LapLink III device driver DD.BIN
  6795.         "SIDExxx"   PCMCIA driver ATADRV.EXE (see AX=440Dh"DOS 3.2+")
  6796.         "STAC-CD"   Stacker/Stacker Anywhere (see AX=4404h"Stacker")
  6797. ---DoubleSpace/DriveSpace---
  6798.  12h  2 BYTEs    signature ",." (2Ch 2Eh)
  6799.  14h    var    preloading API entry point
  6800. ---CD-ROM---
  6801.  12h    WORD    reserved, must be 0000h
  6802.         appears to be another device chain
  6803.  14h    BYTE    drive letter (must initially be 00h; this byte is set by
  6804.           MSCDEX when it loads)
  6805.  15h    BYTE    number of units
  6806.  16h  6 BYTEs    signature 'MSCDnn' where 'nn' is version (currently '00')
  6807. SeeAlso: #1886 at INT 25/AX=CDCDh,#2124 at INT 2F/AX=5600h
  6808.  
  6809. Bitfields for device attributes (character device):
  6810. Bit(s)    Description    (Table 0988)
  6811.  15    set (indicates character device)
  6812.  14    IOCTL supported (see AH=44h)
  6813.  13    (DOS 3.0+) output until busy supported
  6814.  12    reserved
  6815.  11    (DOS 3.0+) OPEN/CLOSE/RemMedia calls supported
  6816.  10-8    reserved
  6817.  7    (DOS 5.0+) Generic IOCTL check call supported (driver command 19h)
  6818.     (see AX=4410h,AX=4411h)
  6819.  6    (DOS 3.2+) Generic IOCTL call supported (driver command 13h)
  6820.     (see AX=440Ch,AX=440Dh"DOS 3.2+")
  6821.  5    reserved
  6822.  4    device is special (use INT 29 "fast console output")
  6823.  3    device is CLOCK$ (all reads/writes use transfer record described
  6824.       below)
  6825.  2    device is NUL
  6826.  1    device is standard output
  6827.  0    device is standard input
  6828. Note:    for European MS-DOS 4.0, bit 11 also indicates that bits 8-6 contain a
  6829.       version code (000 = DOS 3.0,3.1; 001 = DOS 3.2;
  6830.       010 = European DOS 4.0)
  6831. SeeAlso: #0989,#0987
  6832.  
  6833. Bitfields for device attributes (block device):
  6834. Bit(s)    Description    (Table 0989)
  6835.  15    clear (indicates block device)
  6836.  14    IOCTL supported
  6837.  13    non-IBM format
  6838.  12    network device (device is remote)
  6839.  11    (DOS 3.0+) OPEN/CLOSE/RemMedia calls supported
  6840.  10    reserved
  6841.  9    direct I/O not allowed??? (set by DOS 3.3 DRIVER.SYS for "new" drives)
  6842.  8    ??? set by DOS 3.3 DRIVER.SYS for "new" drives
  6843.  7    (DOS 5.0+) Generic IOCTL check call supported (driver command 19h)
  6844.     (see AX=4410h,AX=4411h)
  6845.  6    (DOS 3.2+) Generic IOCTL call supported (driver command 13h)
  6846.     implies support for commands 17h and 18h
  6847.       (see AX=440Ch,AX=440Dh"DOS 3.2+",AX=440Eh,AX=440Fh)
  6848.  5-2    reserved
  6849.  1    driver supports 32-bit sector addressing (DOS 3.31+)
  6850.  0     reserved
  6851. Note:    for European MS-DOS 4.0, bit 11 also indicates that bits 8-6 contain a
  6852.       version code (000 = DOS 3.0,3.1; 001 = DOS 3.2;
  6853.       010 = European DOS 4.0)
  6854. SeeAlso: #0988,#0987
  6855.  
  6856. Format of DOS 2.x disk buffer:
  6857. Offset    Size    Description    (Table 0990)
  6858.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  6859.         least-recently used buffer is first in chain
  6860.  04h    BYTE    drive (0=A, 1=B, etc), FFh if not in use
  6861.  05h  3 BYTEs    unused??? (seems always to be 00h 00h 01h)
  6862.  08h    WORD    logical sector number
  6863.  0Ah    BYTE    number of copies to write (1 for non-FAT sectors)
  6864.  0Bh    BYTE    sector offset between copies if multiple copies to be written
  6865.  0Ch    DWORD    pointer to DOS Drive Parameter Block (see #0742 at AH=32h)
  6866.  10h        buffered data
  6867. SeeAlso: #0991,#0993,#0994,#0996
  6868.  
  6869. Format of DOS 3.x disk buffer:
  6870. Offset    Size    Description    (Table 0991)
  6871.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  6872.         least-recently used buffer is first in chain
  6873.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  6874.  05h    BYTE    buffer flags (see #0992)
  6875.  06h    WORD    logical sector number
  6876.  08h    BYTE    number of copies to write (1 for non-FAT sectors)
  6877.  09h    BYTE    sector offset between copies if multiple copies to be written
  6878.  0Ah    DWORD    pointer to DOS Drive Parameter Block (see #0742 at AH=32h)
  6879.  0Eh    WORD    unused??? (almost always 0)
  6880.  10h        buffered data
  6881. SeeAlso: #0990,#0993,#0994,#0996
  6882.  
  6883. Bitfields for DOS 3.x disk buffer flags:
  6884. Bit(s)    Description    (Table 0992)
  6885.  7    ???
  6886.  6    buffer dirty
  6887.  5    buffer has been referenced
  6888.  4    ???
  6889.  3    sector in data area
  6890.  2    sector in a directory, either root or subdirectory
  6891.  1    sector in FAT
  6892.  0    boot sector??? (guess)
  6893. SeeAlso: #0997
  6894.  
  6895. Format of DOS 4.00 (pre UR 25066) disk buffer info:
  6896. Offset    Size    Description    (Table 0993)
  6897.  00h    DWORD    pointer to array of disk buffer hash chain heads (see #0995)
  6898.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  6899.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6900.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6901.  0Ch    BYTE    00h if buffers in EMS (/X), FFh if not
  6902.  0Dh    WORD    EMS handle for buffers, zero if not in EMS
  6903.  0Fh    WORD    EMS physical page number used for buffers (usually 255)
  6904.  11h    WORD    ??? seems always to be 0001h
  6905.  13h    WORD    segment of EMS physical page frame
  6906.  15h    WORD    ??? seems always to be zero
  6907.  17h  4 WORDs    EMS partial page mapping information???
  6908. SeeAlso: #0990,#0991,#0994,#0998
  6909.  
  6910. Format of DOS 4.01 (from UR 25066 Corrctive Services Disk on) disk buffer info:
  6911. Offset    Size    Description    (Table 0994)
  6912.  00h    DWORD    pointer to array of disk buffer hash chain heads (see #0995)
  6913.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  6914.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6915.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6916.  0Ch    BYTE    01h, possibly to distinguish from pre-UR 25066 format
  6917.  0Dh    WORD    ??? EMS segment for BUFFERS (only with /XD)
  6918.  0Fh    WORD    ??? EMS physical page number of EMS seg above (only with /XD)
  6919.  11h    WORD    ??? EMS segment for ??? (only with /XD)
  6920.  13h    WORD    ??? EMS physical page number of above (only with /XD)
  6921.  15h    BYTE    ??? number of EMS page frames present (only with /XD)
  6922.  16h    WORD    segment of one-sector workspace buffer allocated in main memory
  6923.           if BUFFERS/XS or /XD options in effect, possibly to avoid DMA
  6924.           into EMS
  6925.  18h    WORD    EMS handle for buffers, zero if not in EMS
  6926.  1Ah    WORD    EMS physical page number used for buffers (usually 255)
  6927.  1Ch    WORD    ??? appears always to be 0001h
  6928.  1Eh    WORD    segment of EMS physical page frame
  6929.  20h    WORD    ??? appears always to be zero
  6930.  22h    BYTE    00h if /XS, 01h if /XD, FFh if BUFFERS not in EMS
  6931. SeeAlso: #0990,#0991,#0993,#0998
  6932.  
  6933. Format of DOS 4.x disk buffer hash chain head (array, one entry per chain):
  6934. Offset    Size    Description    (Table 0995)
  6935.  00h    WORD    EMS logical page number in which chain is resident, -1 if not
  6936.           in EMS
  6937.  02h    DWORD    pointer to least recently used buffer header.  All buffers on
  6938.           this chain are in the same segment.
  6939.  06h    BYTE    number of dirty buffers on this chain
  6940.  07h    BYTE    reserved (00h)
  6941. Notes:    buffered disk sectors are assigned to chain N where N is the sector's
  6942.       address modulo NDBCH,     0 <= N <= NDBCH-1
  6943.     each chain resides completely within one EMS page
  6944.     this structure is in main memory even if buffers are in EMS
  6945.  
  6946. Format of DOS 4.0-6.0 disk buffer:
  6947. Offset    Size    Description    (Table 0996)
  6948.  00h    WORD    forward ptr, offset only, to next least recently used buffer
  6949.  02h    WORD    backward pointer, offset only
  6950.  04h    BYTE    drive (0=A,1=B, etc) if bit 7 clear
  6951.         SFT index if bit 7 set
  6952.         FFh if not in use
  6953.  05h    BYTE    buffer flags (see #0997)
  6954.  06h    DWORD    logical sector number (local buffers only)
  6955.  0Ah    BYTE    number of copies to write
  6956.         for FAT sectors, same as number of FATs
  6957.         for data and directory sectors, usually 1
  6958.  0Bh    WORD    offset in sectors between copies to write for FAT sectors
  6959.  0Dh    DWORD    pointer to DOS Drive Parameter Block (see #0742 at AH=32h)
  6960.  11h    WORD    size of data in buffer if remote buffer (see also #0997)
  6961.  13h    BYTE    reserved (padding)
  6962.  14h        buffered data
  6963. Note:    for DOS 4.x, all buffered sectors which have the same hash value
  6964.       (computed as the sum of high and low words of the logical sector
  6965.       number divided by the number of disk buffer chains) are on the same
  6966.       doubly-linked circular chain; for DOS 5+, only a single circular
  6967.       chain exists.
  6968.     the links consist of offset addresses only, the segment being the same
  6969.       for all buffers in the chain.
  6970. SeeAlso: #0990,#0991,#0993
  6971.  
  6972. Bitfields for DOS 4.0-6.0 disk buffer flags:
  6973. Bit(s)    Description    (Table 0997)
  6974.  7    remote buffer
  6975.  6    buffer dirty
  6976.  5    buffer has been referenced (reserved in DOS 5+)
  6977.  4    search data buffer (only valid if remote buffer)
  6978.  3    sector in data area
  6979.  2    sector in a directory, either root or subdirectory
  6980.  1    sector in FAT
  6981.  0    reserved
  6982. SeeAlso: #0992
  6983.  
  6984. Format of DOS 5.0-6.0 disk buffer info:
  6985. Offset    Size    Description    (Table 0998)
  6986.  00h    DWORD    pointer to least-recently-used buffer header (may be in HMA)
  6987.         (see #0996)
  6988.  04h    WORD    number of dirty disk buffers
  6989.  06h    DWORD    pointer to lookahead buffer, zero if not present
  6990.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  6991.  0Ch    BYTE    buffer location
  6992.         00h base memory, no workspace buffer
  6993.         01h HMA, workspace buffer in base memory
  6994.  0Dh    DWORD    pointer to one-segment workspace buffer in base memory
  6995.  11h  3 BYTEs    unused
  6996.  14h    WORD    ???
  6997.  16h    BYTE    flag: INT 24 fail while making an I/O status call
  6998.  17h    BYTE    temp storage for user memory allocation strategy during EXEC
  6999.  18h    BYTE    counter: number of INT 21 calls for which A20 is off
  7000.  19h    BYTE    bit flags
  7001.         bit 0: ???
  7002.         bit 1: SWITCHES=/W specified in CONFIG.SYS (don't load
  7003.             WINA20.SYS when MS Windows 3.0 starts)
  7004.         bit 2: in EXEC state (INT 21/AX=4B05h)
  7005.  1Ah    WORD    offset of unpack code start (used only during INT 21/AX=4B05h)
  7006.  1Ch    BYTE    bit 0 set iff UMB MCB chain linked to normal MCB chain
  7007.  1Dh    WORD    minimum paragraphs of memory required by program being EXECed
  7008.  1Fh    WORD    segment of first MCB in upper memory blocks or FFFFh if DOS
  7009.           memory chain in base 640K only (first UMB MCB usually at
  7010.           9FFFh, locking out video memory with a DOS-owned memory
  7011.           block)
  7012.         the MCB this word points at contains a valid link into high
  7013.           memory even if it is marked with a 'Z' indicating the last
  7014.           memory block
  7015.  21h    WORD    paragraph from which to start scanning during memory allocation
  7016. SeeAlso: #0993,#0994
  7017.  
  7018. (Table 0999)
  7019. Call IFS utility function entry point with:
  7020.     AH = 20h miscellaneous functions
  7021.         AL = 00h get date
  7022.         Return: CX = year
  7023.             DH = month
  7024.             DL = day
  7025.         AL = 01h get process ID and computer ID
  7026.         Return: BX = current PSP segment
  7027.             DX = active network machine number
  7028.         AL = 05h get file system info
  7029.         ES:DI -> 16-byte info buffer
  7030.         Return: buffer filled
  7031.             Offset    Size    Description
  7032.              00h  2 BYTEs    unused
  7033.              02h    WORD    number of SFTs (actually counts only
  7034.                     the first two file table arrays)
  7035.              04h    WORD    number of FCB table entries
  7036.              06h    WORD    number of proctected FCBs
  7037.              08h  6 BYTEs    unused
  7038.              0Eh    WORD    largest sector size supported
  7039.         AL = 06h get machine name
  7040.         ES:DI -> 18-byte buffer for name
  7041.         Return: buffer filled with name starting at offset 02h
  7042.         AL = 08h get sharing retry count
  7043.         Return: BX = sharing retry count
  7044.         AL = other
  7045.         Return: CF set
  7046.     AH = 21h get redirection state
  7047.         BH = type (03h disk, 04h printer)
  7048.         Return: BH = state (00h off, 01h on)
  7049.     AH = 22h ??? some sort of time calculation
  7050.         AL = 00h ???
  7051.             nonzero ???
  7052.     AH = 23h ??? some sort of time calculation
  7053.     AH = 24h compare filenames
  7054.         DS:SI -> first ASCIZ filename
  7055.         ES:DI -> second ASCIZ filename
  7056.         Return: ZF set if files are same ignoring case and / vs \
  7057.     AH = 25h normalize filename
  7058.         DS:SI -> ASCIZ filename
  7059.         ES:DI -> buffer for result
  7060.         Return: filename uppercased, forward slashes changed to backslashes
  7061.     AH = 26h get DOS stack
  7062.         Return: DS:SI -> top of stack
  7063.             CX = size of stack in bytes
  7064.     AH = 27h increment InDOS flag
  7065.     AH = 28h decrement InDOS flag
  7066. Note:    IFS drivers which do not wish to implement functions 20h or 24h-28h may
  7067.       pass them on to the default handler pointed at by [LoL+37h]
  7068. SeeAlso: #1000,#1001
  7069.  
  7070. Format of IFS driver list:
  7071. Offset    Size    Description    (Table 1000)
  7072.  00h    DWORD    pointer to next driver header
  7073.  04h  8 BYTEs    IFS driver name (blank padded), as used by FILESYS command
  7074.  0Ch  4 BYTEs    ???
  7075.  10h    DWORD    pointer to IFS utility function entry point (see #0999)
  7076.         call with ES:BX -> IFS request (see #1001)
  7077.  14h    WORD    offset in header's segment of driver entry point
  7078.     ???
  7079. SeeAlso: #0999,#1001
  7080.  
  7081. Format of IFS request block:
  7082. Offset    Size    Description    (Table 1001)
  7083.  00h    WORD    total size in bytes of request
  7084.  02h    BYTE    class of request
  7085.         02h ???
  7086.         03h redirection
  7087.         04h ???
  7088.         05h file access
  7089.         06h convert error code to string
  7090.         07h ???
  7091.  03h    WORD    returned DOS error code
  7092.  05h    BYTE    IFS driver exit status
  7093.         00h success
  7094.         01h ???
  7095.         02h ???
  7096.         03h ???
  7097.         04h ???
  7098.         FFh internal failure
  7099.  06h 16 BYTEs    ???
  7100. ---request class 02h---
  7101.  16h    BYTE    function code
  7102.         04h ???
  7103.  17h    BYTE    unused???
  7104.  18h    DWORD    pointer to ???
  7105.  1Ch    DWORD    pointer to ???
  7106.  20h  2 BYTEs    ???
  7107. ---request class 03h---
  7108.  16h    BYTE    function code
  7109.  17h    BYTE    ???
  7110.  18h    DWORD    pointer to ???
  7111.  1Ch    DWORD    pointer to ???
  7112.  22h    WORD    returned ???
  7113.  24h    WORD    returned ???
  7114.  26h    WORD    returned ???
  7115.  28h    BYTE    returned ???
  7116.  29h    BYTE    unused???
  7117. ---request class 04h---
  7118.  16h    DWORD    pointer to ???
  7119.  1Ah    DWORD    pointer to ???
  7120. ---request class 05h---
  7121.  16h    BYTE    function code
  7122.         01h flush disk buffers
  7123.         02h get disk space
  7124.         03h MKDIR
  7125.         04h RMDIR
  7126.         05h CHDIR
  7127.         06h delete file
  7128.         07h rename file
  7129.         08h search directory
  7130.         09h file open/create
  7131.         0Ah LSEEK
  7132.         0Bh read from file
  7133.         0Ch write to file
  7134.         0Dh lock region of file
  7135.         0Eh commit/close file
  7136.         0Fh get/set file attributes
  7137.         10h printer control
  7138.         11h ???
  7139.         12h process termination
  7140.         13h ???
  7141.     ---class 05h function 01h---
  7142.      17h  7 BYTEs    ???
  7143.      1Eh    DWORD    pointer to ???
  7144.      22h  4 BYTEs    ???
  7145.      26h    BYTE    ???
  7146.      27h    BYTE    ???
  7147.     ---class 05h function 02h---
  7148.      17h  7 BYTEs    ???
  7149.      1Eh    DWORD    pointer to ???
  7150.      22h  4 BYTEs    ???
  7151.      26h    WORD    returned total clusters
  7152.      28h    WORD    returned sectors per cluster
  7153.      2Ah    WORD    returned bytes per sector
  7154.      2Ch    WORD    returned available clusters
  7155.      2Eh    BYTE    returned ???
  7156.      2Fh    BYTE    ???
  7157.     ---class 05h functions 03h,04h,05h---
  7158.      17h  7 BYTEs    ???
  7159.      1Eh    DWORD    pointer to ???
  7160.      22h  4 BYTEs    ???
  7161.      26h    DWORD    pointer to directory name
  7162.     ---class 05h function 06h---
  7163.      17h  7 BYTEs    ???
  7164.      1Eh    DWORD    pointer to ???
  7165.      22h  4 BYTEs    ???
  7166.      26h    WORD    attribute mask
  7167.      28h    DWORD    pointer to filename
  7168.     ---class 05h function 07h---
  7169.      17h  7 BYTEs    ???
  7170.      1Eh    DWORD    pointer to ???
  7171.      22h  4 BYTEs    ???
  7172.      26h    WORD    attribute mask
  7173.      28h    DWORD    pointer to source filespec
  7174.      2Ch    DWORD    pointer to destination filespec
  7175.     ---class 05h function 08h---
  7176.      17h  7 BYTEs    ???
  7177.      1Eh    DWORD    pointer to ???
  7178.      22h  4 BYTEs    ???
  7179.      26h    BYTE    00h FINDFIRST
  7180.             01h FINDNEXT
  7181.      28h    DWORD    pointer to FindFirst search data + 01h if FINDNEXT
  7182.      2Ch    WORD    search attribute if FINDFIRST
  7183.      2Eh    DWORD    pointer to filespec if FINDFIRST
  7184.     ---class 05h function 09h---
  7185.      17h  7 BYTEs    ???
  7186.      1Eh    DWORD    pointer to ???
  7187.      22h    DWORD    pointer to IFS open file structure (see #1002)
  7188.      26h    WORD    ???  \ together, specify open vs. create, whether or
  7189.      28h    WORD    ???  / not to truncate
  7190.      2Ah  4 BYTEs    ???
  7191.      2Eh    DWORD    pointer to filename
  7192.      32h  4 BYTEs    ???
  7193.      36h    WORD    file attributes on call
  7194.             returned ???
  7195.      38h    WORD    returned ???
  7196.     ---class 05h function 0Ah---
  7197.      17h  7 BYTEs    ???
  7198.      1Eh    DWORD    pointer to ???
  7199.      22h    DWORD    pointer to IFS open file structure (see #1002)
  7200.      26h    BYTE    seek type (02h = from end)
  7201.      28h    DWORD    offset on call
  7202.             returned new absolute position
  7203.     ---class 05h functions 0Bh,0Ch---
  7204.      17h  7 BYTEs    ???
  7205.      1Eh    DWORD    pointer to ???
  7206.      22h    DWORD    pointer to IFS open file structure (see #1002)
  7207.      28h    WORD    number of bytes to transfer
  7208.             returned bytes actually transferred
  7209.      2Ah    DWORD    transfer address
  7210.     ---class 05h function 0Dh---
  7211.      17h  7 BYTEs    ???
  7212.      1Eh    DWORD    pointer to ???
  7213.      22h    DWORD    pointer to IFS open file structure (see #1002)
  7214.      26h    BYTE    file handle???
  7215.      27h    BYTE    unused???
  7216.      28h    WORD    ???
  7217.      2Ah    WORD    ???
  7218.      2Ch    WORD    ???
  7219.      2Eh    WORD    ???
  7220.     ---class 05h function 0Eh---
  7221.      17h  7 BYTEs    ???
  7222.      1Eh    DWORD    pointer to ???
  7223.      22h    DWORD    pointer to IFS open file structure (see #1002)
  7224.      26h    BYTE    00h commit file
  7225.             01h close file
  7226.      27h    BYTE    unused???
  7227.     ---class 05h function 0Fh---
  7228.      17h  7 BYTEs    ???
  7229.      1Eh    DWORD    pointer to ???
  7230.      22h  4 BYTEs    ???
  7231.      26h    BYTE    02h GET attributes
  7232.             03h PUT attributes
  7233.      27h    BYTE    unused???
  7234.      28h 12 BYTEs    ???
  7235.      34h    WORD    search attributes???
  7236.      36h    DWORD    pointer to filename
  7237.      3Ah    WORD    (GET) returned ???
  7238.      3Ch    WORD    (GET) returned ???
  7239.      3Eh    WORD    (GET) returned ???
  7240.      40h    WORD    (GET) returned ???
  7241.      42h    WORD    (PUT) new attributes
  7242.             (GET) returned attributes
  7243.     ---class 05h function 10h---
  7244.      17h  7 BYTEs    ???
  7245.      1Eh    DWORD    pointer to ???
  7246.      22h    DWORD    pointer to IFS open file structure (see #1002)
  7247.      26h    WORD    ???
  7248.      28h    DWORD    pointer to ???
  7249.      2Ch    WORD    ???
  7250.      2Eh    BYTE    ???
  7251.      2Fh    BYTE    subfunction
  7252.             01h get printer setup
  7253.             03h ???
  7254.             04h ???
  7255.             05h ???
  7256.             06h ???
  7257.             07h ???
  7258.             21h set printer setup
  7259.     ---class 05h function 11h---
  7260.      17h  7 BYTEs    ???
  7261.      1Eh    DWORD    pointer to ???
  7262.      22h    DWORD    pointer to IFS open file structure (see #1002)
  7263.      26h    BYTE    subfunction
  7264.      27h    BYTE    unused???
  7265.      28h    WORD    ???
  7266.      2Ah    WORD    ???
  7267.      2Ch    WORD    ???
  7268.      2Eh    BYTE    ???
  7269.      2Fh    BYTE    ???
  7270.     ---class 05h function 12h---
  7271.      17h 15 BYTEs    unused???
  7272.      26h    WORD    PSP segment
  7273.      28h    BYTE    type of process termination
  7274.      29h    BYTE    unused???
  7275.     ---class 05h function 13h---
  7276.      17h 15 BYTEs    unused???
  7277.      26h    WORD    PSP segment
  7278. ---request class 06h---
  7279.  16h    DWORD    returned pointer to string corresponding to error code at 03h
  7280.  1Ah    BYTE    returned ???
  7281.  1Bh    BYTE    unused
  7282. ---request class 07h---
  7283.  16h    DWORD    pointer to IFS open file structure (see #1002)
  7284.  1Ah    BYTE    ???
  7285.  1Bh    BYTE    unused???
  7286. SeeAlso: #1000,#0999,#1002
  7287.  
  7288. Format of IFS open file structure:
  7289. Offset    Size    Description    (Table 1002)
  7290.  00h    WORD    ???
  7291.  02h    WORD    device info word
  7292.  04h    WORD    file open mode
  7293.  06h    WORD    ???
  7294.  08h    WORD    file attributes
  7295.  0Ah    WORD    owner's network machine number
  7296.  0Ch    WORD    owner's PSP segment
  7297.  0Eh    DWORD    file size
  7298.  12h    DWORD    current offset in file
  7299.  16h    WORD    file time
  7300.  18h    WORD    file date
  7301.  1Ah 11 BYTEs    filename in FCB format
  7302.  25h    WORD    ???
  7303.  27h    WORD    hash value of SFT address
  7304.         (low word of linear address + segment&F000h)
  7305.  29h  3 WORDs    network info from SFT
  7306.  2Fh    WORD    ???
  7307.  
  7308. Format of one item in DOS 4.0+ list of special program names:
  7309. Offset    Size    Description    (Table 1003)
  7310.  00h    BYTE    length of name (00h = end of list)
  7311.  01h  N BYTEs    name in format name.ext
  7312.  N    2 BYTEs    DOS version to return for program (major,minor)
  7313.         (see AH=30h,INT 2F/AX=122Fh)
  7314. ---DOS 4 only---
  7315.  N+2    BYTE    number of times to return fake version number (FFh = always)
  7316. Note:    if the name of the executable for the program making the DOS "get
  7317.       version" call matches one of the names in this list, DOS returns the
  7318.       specified version rather than the true version number
  7319. --------v-215252-----------------------------
  7320. INT 21 - VIRUS - "516"/"Leapfrog" - INSTALLATION CHECK
  7321.     AX = 5252h
  7322. Return: BX = FFEEh if resident
  7323. SeeAlso: AX=4BFFh"Cascade",AX=58CCh
  7324. --------D-2153-------------------------------
  7325. INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK TO DRIVE PARAM BLOCK
  7326.     AH = 53h
  7327.     DS:SI -> BIOS Parameter Block (see #1004)
  7328.     ES:BP -> buffer for Drive Parameter Block (see #0742 at AH=32h)
  7329. Return: ES:BP buffer filled
  7330. Notes:    for DOS 3.0+, the cluster at which to start searching is set to 0000h
  7331.       and the number of free clusters is set to FFFFh (unknown)
  7332.     if the number of sectors per cluster is set to zero, MS-DOS will hang
  7333.       at startup because it computes the internally-used shift count by
  7334.       shifting this value right until the carry flag is set; since this
  7335.       will never happen when the field is zero, MS-DOS hangs
  7336.     not supported by Windows NT 3.1
  7337.  
  7338. Format of BIOS Parameter Block:
  7339. Offset    Size    Description    (Table 1004)
  7340.  00h    WORD    number of bytes per sector
  7341.  02h    BYTE    number of sectors per cluster
  7342.  03h    WORD    number of reserved sectors at start of disk
  7343.  05h    BYTE    number of FATs
  7344.  06h    WORD    number of entries in root directory
  7345.  08h    WORD    total number of sectors
  7346.         for DOS 4.0+, set to zero if partition >32M, then set DWORD at
  7347.           15h to actual number of sectors
  7348.  0Ah    BYTE    media ID byte (see #0703)
  7349.  0Bh    WORD    number of sectors per FAT
  7350. ---DOS 2.13---
  7351.  0Dh    WORD    number of sectors per track
  7352.  0Fh    WORD    number of heads
  7353.  11h    WORD    number of hidden sectors
  7354. ---DOS 3.0+ ---
  7355.  0Dh    WORD    number of sectors per track
  7356.  0Fh    WORD    number of heads
  7357.  11h    DWORD    number of hidden sectors
  7358.  15h 11 BYTEs    reserved
  7359. ---DOS 4.0+ ---
  7360.  15h    DWORD    total number of sectors if word at 08h contains zero
  7361.  19h  6 BYTEs    ???
  7362.  1Fh    WORD    number of cylinders
  7363.  21h    BYTE    device type
  7364.  22h    WORD    device attributes (removable or not, etc)
  7365. ---DR DOS 5+ ---
  7366.  15h    DWORD    total number of sectors if word at 08h contains zero
  7367.  19h  6 BYTEs    reserved
  7368. ---European MS-DOS 4.00---
  7369.  15h    DWORD    total number of sectors if word at 08h contains zero
  7370.         (however, this DOS does not actually implement >32M partitions)
  7371. SeeAlso: #0742
  7372. --------D-2154-------------------------------
  7373. INT 21 - DOS 2+ - GET VERIFY FLAG
  7374.     AH = 54h
  7375. Return: AL = verify flag
  7376.         00h off
  7377.         01h on (all disk writes verified after writing)
  7378. SeeAlso: AH=2Eh
  7379. --------v-2154--BX4475-----------------------
  7380. INT 21 - VIRUS - "Dual_GtM"/"Ganeu" - INSTALLATION CHECK
  7381.     AH = 54h
  7382.     BX = 4475h ("Du")
  7383.     CX = 616Ch ("al")
  7384. Return: BX = 4774h ("Gt") and CX = 4D21h ("M!") if resident
  7385. SeeAlso: AX=50FDh"VIRUS",AX=5454h"VIRUS"
  7386. --------v-215454-----------------------------
  7387. INT 21 - VIRUS - "Dudley" - INSTALLATION CHECK
  7388.     AX = 5454h
  7389. Return: AX = 0000h if resident
  7390. SeeAlso: AX=50FDh"VIRUS",AH=54h/BX=4475h"VIRUS",AX=7BCEh"VIRUS"
  7391. --------D-2155-------------------------------
  7392. INT 21 - DOS 2+ internal - CREATE CHILD PSP
  7393.     AH = 55h
  7394.     DX = segment at which to create new PSP
  7395.     SI = (DOS 3.0+) value to place in memory size field at DX:[0002h]
  7396. Return: AL destroyed
  7397. Notes:    creates a "child" PSP rather than making an exact copy of the current
  7398.       PSP; the new PSP's parent pointer is set to the current PSP and the
  7399.       reference count for each inherited file is incremented
  7400.     (DOS 2.0+) sets current PSP to DX
  7401.     (DOS 3.0+) marks "no inherit" file handles as closed in child PSP
  7402.     this function is implemented using the same code as AH=26h, so unlike
  7403.       other DOS 2+ functions, it does not return status in CF, instead
  7404.       returning status in AL as DOS 1.x functions do (but it never puts an
  7405.       explicit return value in AL)
  7406. SeeAlso: AH=26h,AH=50h
  7407. --------D-2156-------------------------------
  7408. INT 21 - DOS 2+ - "RENAME" - RENAME FILE
  7409.     AH = 56h
  7410.     DS:DX -> ASCIZ filename of existing file (no wildcards, but see below)
  7411.     ES:DI -> ASCIZ new filename (no wildcards)
  7412.     CL = attribute mask (server call only, see below)
  7413. Return: CF clear if successful
  7414.     CF set on error
  7415.         AX = error code (02h,03h,05h,11h) (see #1020)
  7416. Notes:    allows move between directories on same logical volume
  7417.     this function does not set the archive attribute
  7418.       (see #0765 at AX=4301h), which results in incremental backups not
  7419.       backing up the file under its new name
  7420.     open files should not be renamed
  7421.     (DOS 2.x only) this function renames file by creating a new directory
  7422.       entry with the new name,then marking the old entry deleted
  7423.     (DOS 3.0+) allows renaming of directories
  7424.     (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  7425.       error 12h (no more files) is returned on success, and both source and
  7426.       destination specs must be canonical (as returned by AH=60h).
  7427.       Wildcards in the destination are replaced by the corresponding char
  7428.       of each source file being renamed.  Under DOS 3.x, the call will fail
  7429.       if the destination wildcard is *.* or equivalent; under DR DOS 5.0,
  7430.       the call will fail if any wildcards are used.     When invoked via
  7431.       AX=5D00h, only those files matching the attribute mask in CL are
  7432.       renamed.
  7433.     under the FlashTek X-32 DOS extender, the old-name pointer is in DS:EDX
  7434.       and the new-name pointer is in ES:EDI (DS must equal ES)
  7435. BUG:    (DR DOS 3.41) when invoked via AX=5D00h, this function will generate
  7436.       a new directory entry with the new name (including any wildcards)
  7437.       which can only be removed with a sector editor
  7438. SeeAlso: AH=17h,AX=4301h,AX=5D00h,AH=60h,AH=71h,AX=F257h/SF=04h
  7439. --------v-215643------------------------
  7440. INT 21 - VIRUS - "PS-MPC.Gold" - INSTALLATION CHECK
  7441.     AX = 5643h  ('VC')
  7442. Return: AX = 5053h  ('PS') if resident
  7443. SeeAlso: AX=33E0h"VIRUS",AX=6303h"VIRUS"
  7444. --------D-215700-----------------------------
  7445. INT 21 - DOS 2+ - GET FILE'S LAST-WRITTEN DATE AND TIME
  7446.     AX = 5700h
  7447.     BX = file handle
  7448. Return: CF clear if successful
  7449.         CX = file's time (see #1005)
  7450.         DX = file's date (see #1006)
  7451.     CF set on error
  7452.         AX = error code (01h,06h) (see #1020)
  7453. Note:    under DR DOS 3.41 and 5.0, this function returns 0 (no date/time) for
  7454.       character devices; MS-DOS returns date and time of opening
  7455. SeeAlso: AX=5701h,AX=5704h"Windows95"
  7456.  
  7457. Bitfields for file time:
  7458. Bit(s)    Description    (Table 1005)
  7459.  15-11    hours (0-23)
  7460.  10-5    minutes
  7461.  4-0    seconds/2
  7462.  
  7463. Bitfields for file date:
  7464. Bit(s)    Description    (Table 1006)
  7465.  15-9    year - 1980
  7466.  8-5    month
  7467.  4-0    day
  7468. --------D-215701-----------------------------
  7469. INT 21 - DOS 2+ - SET FILE'S LAST-WRITTEN DATE AND TIME
  7470.     AX = 5701h
  7471.     BX = file handle
  7472.     CX = new time (see #1005)
  7473.     DX = new date (see #1006)
  7474. Return: CF clear if successful
  7475.     CF set on error
  7476.         AX = error code (01h,06h) (see #1020)
  7477. SeeAlso: AX=5700h,AX=5705h"Windows95",AX=5707h"Windows95"
  7478. --------D-215702-----------------------------
  7479. INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTES FOR FILE
  7480.     AX = 5702h
  7481.     BX = file handle
  7482.     CX = size of result buffer or 0000h
  7483.     DS:SI -> EAP list (see #1007)
  7484.     ES:DI -> buffer for returned EAV list (see #1010)
  7485. Return: CF clear if successful
  7486.         CX = size of returned data
  7487.     CF set on error
  7488.         AX = error code (see #1020)
  7489. Desc:    get the current value of one or more extended attributes
  7490. Notes:    if CX=0000h on entry, ES:DI is ignored and no data is actually
  7491.       returned, only the amount of data which is available
  7492.     the default DOS 4 behavior is to return a single word of 0000h (no
  7493.       structures) in the result buffer if CX>=0002h on entry; this
  7494.       functionality was apparently never released to the public
  7495. SeeAlso: AX=5703h,AX=5704h,AH=6Eh,INT 2F/AX=112Dh
  7496.  
  7497. Format of EAP (extended attribute properties) list:
  7498. Offset    Size    Description    (Table 1007)
  7499.  00h    WORD    number of EAP structures following
  7500.  02h    var    array of EAP structures (see #1008)
  7501. SeeAlso: #1010
  7502.  
  7503. Format of EAP (extended attribute property) structure:
  7504. Offset    Size    Description    (Table 1008)
  7505.  00h    BYTE    attribute type
  7506.         01h boolean (either 00h or 01h)
  7507.         02h number (BYTE, WORD, or DWORD)
  7508.         03h string
  7509.         04h date stamp
  7510.         05h time stamp
  7511.  01h    WORD    EAP flags (see #1009)
  7512.  03h    BYTE    size of reference string (name)
  7513.  04h  N BYTEs    reference string
  7514.  
  7515. Bitfields for EAP flags:
  7516. Bit(s)    Description    (Table 1009)
  7517.  12    unchangeable
  7518.  13    ignore
  7519.  14    unchangeable
  7520.  15    used by COMMAND.COM for code page, but not understood by ATTRIB
  7521.  
  7522. Format of EAV (extended attribute value) list:
  7523. Offset    Size    Description    (Table 1010)
  7524.  00h    WORD    number of EAV structures following
  7525.  02h    var    array of Extended Attribute Value structures (see #1011)
  7526. SeeAlso: #1007
  7527.  
  7528. Format of Extended Attribute Value structures:
  7529. Offset    Size    Description    (Table 1011)
  7530.  00h  4 BYTEs    ???
  7531.  04h    BYTE    size of reference string
  7532.  05h    WORD    size of value
  7533.  07h    var    reference string
  7534.     var    value
  7535. --------O-215702-----------------------------
  7536. INT 21 - OS/2 v1.1+ Family API - DosQFileInfo
  7537.     AX = 5702h
  7538.     BX = file handle
  7539.     CX = size of buffer for information
  7540.     DX = level of information
  7541.         0001h standard file information (see #1012)
  7542.         0002h Query EA Size (see #1012)
  7543.         0003h Query EAs from List (see #1013)
  7544.         0004h Query All EAs (see #1013)
  7545.     ES:DI -> buffer for information (see #1012,#1013)
  7546. Return: CF clear if successful
  7547.     CF set on error
  7548.         AX = error code
  7549. SeeAlso: AX=5702h/BX=FFFFh,AX=5703h"OS/2",AH=6Dh"OS/2"
  7550.  
  7551. Format of OS/2 DosQFileInfo:
  7552. Offset    Size    Description    (Table 1012)
  7553.  00h    WORD    creation date
  7554.  02h    WORD    creation time
  7555.  04h    WORD    last access date
  7556.  06h    WORD    last access time
  7557.  08h    WORD    last write date
  7558.  0Ah    WORD    last write time
  7559.  0Ch    DWORD    file size in bytes
  7560.  10h    DWORD    allocated space in bytes
  7561.  14h    WORD    file attributes
  7562. ---level 2 only---
  7563.  16h    DWORD    size of Extended Attributes in byte
  7564. SeeAlso: #1013,#1016
  7565.  
  7566. Format of OS/2 DosQFileInfo, EAOP structure:
  7567. Offset    Size    Description    (Table 1013)
  7568.  00h    DWORD    pointer to general EA list (see #1014)
  7569.  04h    DWORD    pointer to buffer for full EA list, with length field set
  7570.  08h    DWORD    (ret) error
  7571. Note:    for info level 3, the first pointer must contain the address of a
  7572.       list of the Extended Attributes to be retrieved; for info level 4,
  7573.       it should be 0000h:0000h
  7574. SeeAlso: #1012,#1016
  7575.  
  7576. Format of OS/2 DosQFileInfo, General EA List:
  7577. Offset    Size    Description    (Table 1014)
  7578.  00h    DWORD    (call) total size of list in bytes (including this field)
  7579.         (ret) number of bytes actually used (including this field)
  7580.  04h    var    Extended Attribute entries (see #1015) [packed arrray]
  7581.  
  7582. Format of OS/2 DosQFileInfo, General EA entry:
  7583. Offset    Size    Description    (Table 1015)
  7584.  00h    BYTE    length of Extended Attribute name (excluding terminating NUL)
  7585.  01h  N BYTEs    EA name
  7586.     BYTE    00h
  7587. SeeAlso: #1014
  7588.  
  7589. Format of OS/2 DosQFileInfo, Full EA List:
  7590. Offset    Size    Description    (Table 1016)
  7591.  00h    DWORD    (call) total size of list in bytes (including this field)
  7592.         (ret) number of bytes actually used (including this field)
  7593.  04h    var    Extended Attribute data (see #1017) [packed array]
  7594. SeeAlso: #1012,#1013
  7595.  
  7596. Format of OS/2 Extended Attribute data (struct FEA):
  7597. Offset    Size    Description    (Table 1017)
  7598.  00h    BYTE    flags
  7599.         bit 7: critical EA
  7600.  01h    BYTE    length of Extended Attribute name (excluding terminating NUL)
  7601.  02h    WORD    length of Extended Attribute value
  7602.  04h  N BYTEs    EA name
  7603.     BYTE    00h
  7604.       M BYTEs    EA value
  7605. --------O-215702BXFFFF-----------------------
  7606. INT 21 - OS/2 v1.1+ Compatibility Box Family API - DosQPathInfo
  7607.     AX = 5702h
  7608.     BX = FFFFh
  7609.     CX = size of buffer for information
  7610.     DX = level of information (0002h)
  7611.     DS:SI -> filename
  7612.     ES:DI -> buffer for FAPI path information (see #1018)
  7613. Return: CF clear if successful
  7614.         AL = 00h
  7615.     CF set on error
  7616.         AX = error code
  7617. SeeAlso: AX=5702h"OS/2",AX=5703h/BX=FFFFh
  7618.  
  7619. Format of FAPI path information:
  7620. Offset    Size    Description    (Table 1018)
  7621.  00h 22 BYTEs    ???
  7622.  16h    DWORD    extended attribute size (none present if less than 5)
  7623. --------D-215703-----------------------------
  7624. INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTE PROPERTIES
  7625.     AX = 5703h
  7626.     BX = file handle
  7627.     CX = size of result buffer or 0000h
  7628.     ES:DI -> result buffer
  7629. Return: CF clear if successful
  7630.         CX = size of returned data
  7631.     CF set on error
  7632.         AX = error code (see #1020)
  7633.     ES:DI -> zero word (DOS 4.0) if CX >= 2 on entry
  7634. Desc:    get a list of the extended attributes which are defined for the
  7635.       specified file
  7636. Notes:    if CX=0000h on entry, ES:DI is ignored and no data is actually
  7637.       returned, only the amount of data which is available
  7638.     the default DOS 4 behavior is to return a trivial EAP list consisting
  7639.       of the single word 0000h (no EAP structures) if CX>=0002h on entry;
  7640.       this functionality was apparently never released to the public
  7641. SeeAlso: AX=5702h,AX=5704h,AH=6Eh,INT 2F/AX=112Dh
  7642. --------O-215703-----------------------------
  7643. INT 21 - OS/2 v1.1+ Family API - DosSetFileInfo
  7644.     AX = 5703h
  7645.     BX = file handle
  7646.     CX = size of information buffer
  7647.     DX = level of information
  7648.     ES:DI -> information buffer
  7649. Return: CF clear if successful
  7650.     CF set on error
  7651.         AX = error code
  7652. SeeAlso: AX=5702h"OS/2",AX=5703h/BX=FFFFh
  7653. --------O-215703BXFFFF-----------------------
  7654. INT 21 - OS/2 v1.1+ Family API - DosSetPathInfo
  7655.     AX = 5703h
  7656.     BX = FFFFh
  7657.     CX = size of information buffer
  7658.     DX = level of information
  7659.     DS:SI -> filename
  7660.     ES:DI -> information buffer
  7661. Return: CF clear if successful
  7662.     CF set on error
  7663.         AX = error code
  7664. SeeAlso: AX=5702h/BX=FFFFh,AX=5703h"OS/2"
  7665. --------D-215704-----------------------------
  7666. INT 21 - DOS 4.x only - SET EXTENDED ATTRIBUTES
  7667.     AX = 5704h
  7668.     BX = file handle
  7669.     ES:DI -> EAV list (see #1010)
  7670. Return: CF clear if successful
  7671.     CF set on error
  7672.         AX = error code (see #1020)
  7673. Note:    the default DOS 4 behavior is to do nothing and return successfully;
  7674.       this functionality was apparently never released to the public
  7675. SeeAlso: AX=5702h,AX=5703h,INT 2F/AX=112Dh
  7676. --------D-215704-----------------------------
  7677. INT 21 - MS-DOS 7/Windows95 - GET LAST ACCESS DATE AND TIME
  7678.     AX = 5704h
  7679.     BX = file handle
  7680. Return: CF clear if successful
  7681.         DX = last access date (see #1006)
  7682.         CX = last access time (currently always 0000h)
  7683.     CF set on error
  7684.         AX = error code
  7685. SeeAlso: AX=5701h,AX=5705h,AX=5706h
  7686. --------D-215705-----------------------------
  7687. INT 21 - MS-DOS 7/Windows95 - SET LAST ACCESS DATE AND TIME
  7688.     AX = 5705h
  7689.     BX = file handle
  7690.     CX = new last-access time (currently not supported, must be 0000h)
  7691.     DX = new last-access date (see #1006)
  7692. Return: CF clear if successful
  7693.     CF set on error
  7694.         AX = error code
  7695. SeeAlso: AX=5700h,AX=5704h"Windows95",AX=5707h
  7696. --------D-215706-----------------------------
  7697. INT 21 - MS-DOS 7/Windows95 - GET CREATION DATE AND TIME
  7698.     AX = 5706h
  7699.     BX = file handle
  7700. Return: CF clear if successful
  7701.         CX = creation time (see #1005)
  7702.         DX = creation date (see #1006)
  7703.         SI = number of 10-millisecond units past time in CX (0-199)
  7704.     CF set on error
  7705.         AX = error code
  7706. SeeAlso: AX=5701h,AX=5704h"Windows95",AX=5707h
  7707. --------D-215707-----------------------------
  7708. INT 21 - MS-DOS 7/Windows95 - SET CREATION DATE AND TIME
  7709.     AX = 5707h
  7710.     BX = file handle
  7711.     CX = new creation time (see #1005)
  7712.     DX = new creation date (see #1006)
  7713.     SI = new creation time: 10-millisecond units past time in CX (0-199)
  7714. Return: CF clear if successful
  7715.     CF set on error
  7716.         AX = error code
  7717. SeeAlso: AX=5700h,AX=5705h,AX=5706h
  7718. --------U-215757BX5757-----------------------
  7719. INT 21 U - IBM Genie - Resident Manager - INSTALLATION CHECK
  7720.     AX = 5757h
  7721.     BX = 5757h
  7722. Return: AX = 0000h if installed
  7723.         BX = ???
  7724.         DX = ???
  7725.         DS:SI -> list of 27 DWORD entry point addresses
  7726. Program: IBM Genie is a set of utility TSRs by Helix Software
  7727. Note:    other functions possible if BX <> 5757h, but details not yet available
  7728. ----------215758-----------------------------
  7729. INT 21 U - Headroom - API
  7730.     AX = 5758h
  7731.     BL = function
  7732.         00h ???
  7733.         01h get Headroom location
  7734.         Return: CF clear if installed
  7735.                 AX = PSP segment of Headroom TSR
  7736.                 BX = paragraphs of memory used by Headroom
  7737.             CF set if not (normal DOS return)
  7738.         Note:    this function is also used as an installation check
  7739.         02h get INT 21 handler
  7740.         Return: CF clear
  7741.             ES:BX -> Headroom's INT 21 handler
  7742.         Note: also sets unknown flag
  7743.         03h launch application???
  7744.         DS:SI -> 233-byte application record
  7745.         Return: ???
  7746.         04h ???
  7747.         ???
  7748.         Return: CF clear
  7749.         05h get swap directory
  7750.         Return: CF clear
  7751.             DX:AX -> ASCIZ swap directory name
  7752.         06h ???
  7753.         DX = ???
  7754.         Return: CF clear
  7755.         07h ???
  7756.         08h ???
  7757.         09h get current application
  7758.         Return: BX = application number
  7759.         0Ah ???
  7760.         DX = application number
  7761.         DS:SI = ???
  7762.         Return: ???
  7763.         0Bh ???
  7764.         0Ch ???
  7765.         DX = application number
  7766.         ???
  7767.         Return: ???
  7768.         0Dh ???
  7769.         DX = application number
  7770.         ???
  7771.         Return: ???
  7772.         0Eh get ???
  7773.         Return: CF clear
  7774.             AX = ???
  7775.         0Fh set ??? flag
  7776.         10h clear ??? flag
  7777.         11h find application by name
  7778.         DS:SI -> ASCIZ application name
  7779.         Return: CF clear
  7780.             AX = application number or FFFFh if not loaded
  7781.         12h ???
  7782.         DX = application number
  7783.         Return: CF clear
  7784.             ???
  7785.         13h ???
  7786.         Return: CF clear
  7787.         14h ???
  7788.         same as function 13h
  7789.         15h set ???
  7790.         DX = ???
  7791.         16h get ???
  7792.         Return: AX = ??? set by function 15h
  7793.         17h get ???
  7794.         Return: BX = ???
  7795.             CX = ??? (may be pointer in BX:CX)
  7796.         18h BUG: branches incorrectly due to fencepost error
  7797. Program: Headroom is a TSR/task switcher by Helix Software
  7798. SeeAlso: AX=4C57h,AX=5757h,INT 2F/AX=5758h
  7799. --------D-2158-------------------------------
  7800. INT 21 - DOS 2.11+ - GET OR SET MEMORY ALLOCATION STRATEGY
  7801.     AH = 58h
  7802.     AL = subfunction
  7803.         00h get allocation strategy
  7804.         Return: AX = current strategy (see #1019)
  7805.         01h set allocation strategy
  7806.         BL = new allocation strategy (see #1019)
  7807.         BH = 00h (DOS 5+)
  7808. Return: CF clear if successful
  7809.     CF set on error
  7810.         AX = error code (01h) (see #1020)
  7811. Notes:    the Set subfunction accepts any value in BL for DOS 3.x and 4.x;
  7812.       2 or greater means last fit
  7813.     the Get subfunction returns the last value set
  7814.     setting an allocation strategy involving high memory does not
  7815.       automatically link in the UMB memory chain; this must be done
  7816.       explicitly with AX=5803h in order to actually allocate high memory
  7817.     a program which changes the allocation strategy should restore it
  7818.       before terminating
  7819.     Toshiba MS-DOS v2.11 supports subfunctions 00h and 01h, as does the
  7820.       TI Professional MS-DOS v2.13
  7821.     DR DOS 3.41 reportedly reverses subfunctions 00h and 01h
  7822. SeeAlso: AH=48h,AH=49h,AH=4Ah,INT 2F/AX=4310h,INT 67/AH=3Fh
  7823.  
  7824. (Table 1019)
  7825. Values for DOS memory allocation strategy:
  7826.  00h low memory first fit
  7827.  01h low memory best fit
  7828.  02h low memory last fit
  7829. ---DOS 5+ ---
  7830.  40h high memory first fit
  7831.  41h high memory best fit
  7832.  42h high memory last fit
  7833.  80h first fit, try high then low memory
  7834.  81h best fit, try high then low memory
  7835.  82h last fit, try high then low memory
  7836. --------D-2158-------------------------------
  7837. INT 21 - DOS 5+ - GET OR SET UMB LINK STATE
  7838.     AH = 58h
  7839.     AL = subfunction
  7840.         02h get UMB link state
  7841.         Return: AL = current link state
  7842.                 00h UMBs not part of DOS memory chain
  7843.                 01h UMBs in DOS memory chain
  7844.         03h set UMB link state
  7845.         BX = new link state
  7846.             0000h remove UMBs from DOS memory chain
  7847.             0001h add UMBs to DOS memory chain
  7848. Return: CF clear if successful
  7849.     CF set on error
  7850.         AX = error code (01h) (see #1020)
  7851. Notes:    a program which changes the UMB link state should restore it before
  7852.       terminating
  7853.     UMBs will only be available if CONFIG.SYS contains the line DOS=UMB,
  7854.       the UMBs have been linked into the memory chain with AX=5803h, and
  7855.       the allocation strategy has been set to include high memory with
  7856.       AX=5801h
  7857. SeeAlso: #1027,#2046 at INT 2F/AX=4310h
  7858. --------v-2158CC-----------------------------
  7859. INT 21 - VIRUS - "1067"/"Headcrash" - INSTALLATION CHECK
  7860.     AX = 58CCh
  7861. Return: CF clear if resident
  7862. SeeAlso: AX=5643h,AX=5252h,AX=58DDh,AX=6303h"VIRUS",AX=6969h
  7863. --------v-2158DD-----------------------------
  7864. INT 21 - VIRUS - "1067"/"Headcrash" - GET ORIGINAL INT 21h VECTOR
  7865.     AX = 58DDh
  7866. Return: CX = code segment of virus
  7867.     ES:BX = old INT 21h vector
  7868. SeeAlso: AX=5252h,AX=58CCh,AX=6969h
  7869. --------D-2159--BX0000-----------------------
  7870. INT 21 - DOS 3.0+ - GET EXTENDED ERROR INFORMATION
  7871.     AH = 59h
  7872.     BX = 0000h
  7873. Return: AX = extended error code (see #1020)
  7874.     BH = error class (see #1022)
  7875.     BL = recommended action (see #1023)
  7876.     CH = error locus (see #1024)
  7877.     ES:DI may be pointer (see #1021, #1020)
  7878.     CL, DX, SI, BP, and DS destroyed
  7879. Notes:    functions available under DOS 2.x map the true DOS 3.0+ error code into
  7880.       one supported under DOS 2.x
  7881.     you should call this function to retrieve the true error code when an
  7882.       FCB or DOS 2.x call returns an error
  7883.     under DR DOS 5.0, this function does not use any of the DOS-internal
  7884.       stacks and may thus be called at any time
  7885. SeeAlso: AH=59h/BX=0001h,AX=5D0Ah,INT 2F/AX=122Dh
  7886.  
  7887. (Table 1020)
  7888. Values for DOS extended error code:
  7889.  00h (0)   no error
  7890.  01h (1)   function number invalid
  7891.  02h (2)   file not found
  7892.  03h (3)   path not found
  7893.  04h (4)   too many open files (no handles available)
  7894.  05h (5)   access denied
  7895.  06h (6)   invalid handle
  7896.  07h (7)   memory control block destroyed
  7897.  08h (8)   insufficient memory
  7898.  09h (9)   memory block address invalid
  7899.  0Ah (10)  environment invalid (usually >32K in length)
  7900.  0Bh (11)  format invalid
  7901.  0Ch (12)  access code invalid
  7902.  0Dh (13)  data invalid
  7903.  0Eh (14)  reserved
  7904.  0Fh (15)  invalid drive
  7905.  10h (16)  attempted to remove current directory
  7906.  11h (17)  not same device
  7907.  12h (18)  no more files
  7908. ---DOS 3.0+ ---
  7909.  13h (19)  disk write-protected
  7910.  14h (20)  unknown unit
  7911.  15h (21)  drive not ready
  7912.  16h (22)  unknown command
  7913.  17h (23)  data error (CRC)
  7914.  18h (24)  bad request structure length
  7915.  19h (25)  seek error
  7916.  1Ah (26)  unknown media type (non-DOS disk)
  7917.  1Bh (27)  sector not found
  7918.  1Ch (28)  printer out of paper
  7919.  1Dh (29)  write fault
  7920.  1Eh (30)  read fault
  7921.  1Fh (31)  general failure
  7922.  20h (32)  sharing violation
  7923.  21h (33)  lock violation
  7924.  22h (34)  disk change invalid (ES:DI -> media ID structure)(see #1021)
  7925.  23h (35)  FCB unavailable
  7926.  24h (36)  sharing buffer overflow
  7927.  25h (37)  (DOS 4.0+) code page mismatch
  7928.  26h (38)  (DOS 4.0+) cannot complete file operation (out of input)
  7929.  27h (39)  (DOS 4.0+) insufficient disk space
  7930.  28h-31h   reserved
  7931.  32h (50)  network request not supported
  7932.  33h (51)  remote computer not listening
  7933.  34h (52)  duplicate name on network
  7934.  35h (53)  network name not found
  7935.  36h (54)  network busy
  7936.  37h (55)  network device no longer exists
  7937.  38h (56)  network BIOS command limit exceeded
  7938.  39h (57)  network adapter hardware error
  7939.  3Ah (58)  incorrect response from network
  7940.  3Bh (59)  unexpected network error
  7941.  3Ch (60)  incompatible remote adapter
  7942.  3Dh (61)  print queue full
  7943.  3Eh (62)  queue not full
  7944.  3Fh (63)  not enough space to print file
  7945.  40h (64)  network name was deleted
  7946.  41h (65)  network: Access denied
  7947.  42h (66)  network device type incorrect
  7948.  43h (67)  network name not found
  7949.  44h (68)  network name limit exceeded
  7950.  45h (69)  network BIOS session limit exceeded
  7951.  46h (70)  temporarily paused
  7952.  47h (71)  network request not accepted
  7953.  48h (72)  network print/disk redirection paused
  7954.  49h (73)  network software not installed
  7955.         (LANtastic) invalid network version
  7956.  4Ah (74)  unexpected adapter close
  7957.         (LANtastic) account expired
  7958.  4Bh (75)  (LANtastic) password expired
  7959.  4Ch (76)  (LANtastic) login attempt invalid at this time
  7960.  4Dh (77)  (LANtastic v3+) disk limit exceeded on network node
  7961.  4Eh (78)  (LANtastic v3+) not logged in to network node
  7962.  4Fh (79)  reserved
  7963.  50h (80)  file exists
  7964.  51h (81)  reserved
  7965.  52h (82)  cannot make directory
  7966.  53h (83)  fail on INT 24h
  7967.  54h (84)  (DOS 3.3+) too many redirections
  7968.  55h (85)  (DOS 3.3+) duplicate redirection
  7969.  56h (86)  (DOS 3.3+) invalid password
  7970.  57h (87)  (DOS 3.3+) invalid parameter
  7971.  58h (88)  (DOS 3.3+) network write fault
  7972.  59h (89)  (DOS 4.0+) function not supported on network
  7973.  5Ah (90)  (DOS 4.0+) required system component not installed
  7974.  64h (100) (MSCDEX) unknown error
  7975.  65h (101) (MSCDEX) not ready
  7976.  66h (102) (MSCDEX) EMS memory no longer valid
  7977.  67h (103) (MSCDEX) not High Sierra or ISO-9660 format
  7978.  68h (104) (MSCDEX) door open
  7979.  B0h (176) (MS-DOS 7.0) volume is not locked
  7980.  B1h (177) (MS-DOS 7.0) volume is locked in drive
  7981.  B2h (178) (MS-DOS 7.0) volume is not removable
  7982.  B4h (180) (MS-DOS 7.0) lock count has been exceeded
  7983.  B5h (181) (MS-DOS 7.0) a valid eject request failed
  7984. SeeAlso: #1022,#1023,#1024
  7985.  
  7986. Format of media ID structure:
  7987. Offset    Size    Description    (Table 1021)
  7988.  00h 12 BYTEs    ASCIZ volume label of required disk
  7989.  0Ch    DWORD    serial number (DOS 4.0+)
  7990.  
  7991. (Table 1022)
  7992. Values for DOS Error Class:
  7993.  01h    out of resource (storage space or I/O channels)
  7994.  02h    temporary situation (file or record lock)
  7995.  03h    authorization (denied access)
  7996.  04h    internal (system software bug)
  7997.  05h    hardware failure
  7998.  06h    system failure (configuration file missing or incorrect)
  7999.  07h    application program error
  8000.  08h    not found
  8001.  09h    bad format
  8002.  0Ah    locked
  8003.  0Bh    media error
  8004.  0Ch    already exists
  8005.  0Dh    unknown
  8006. SeeAlso: #1020,#1023,#1024
  8007.  
  8008. (Table 1023)
  8009. Values for DOS Suggested Action:
  8010.  01h    retry
  8011.  02h    delayed retry
  8012.  03h    prompt user to reenter input
  8013.  04h    abort after cleanup
  8014.  05h    immediate abort
  8015.  06h    ignore
  8016.  07h    retry after user intervention
  8017. SeeAlso: #1020,#1022,#1024
  8018.  
  8019. (Table 1024)
  8020. Values for DOS Error Locus:
  8021.  01h    unknown or not appropriate
  8022.  02h    block device (disk error)
  8023.  03h    network related
  8024.  04h    serial device (timeout)
  8025.  05h    memory related
  8026. SeeAlso: #1020,#1022,#1023
  8027. --------D-2159--BX0001-----------------------
  8028. INT 21 - European MS-DOS 4.0 - GET HARD ERROR INFORMATION
  8029.     AH = 59h
  8030.     BX = 0001h
  8031. Return: ES:DI -> hard error information packet (see #1025) for most recent
  8032.         hard (critical) error
  8033. SeeAlso: AH=59h/BX=0000h,AH=95h,INT 24
  8034.  
  8035. Format of European MS-DOS 4.0 hard error information packet:
  8036. Offset    Size    Description    (Table 1025)
  8037.  00h    WORD    contents of AX at system entry
  8038.  02h    WORD    Process ID which encountered error
  8039.  04h    WORD    contents of AX at time of error
  8040.  06h    BYTE    error type
  8041.         00h physical I/O error
  8042.         01h disk change request
  8043.         02h file sharing violation
  8044.         03h FCB problem
  8045.         04h file locking violation
  8046.         05h bad FAT
  8047.         06h network detected error
  8048.  07h    BYTE    INT 24 error code
  8049.  08h    WORD    extended error code (see #1020)
  8050.  0Ah    DWORD    pointer to associated device
  8051. --------D-215A-------------------------------
  8052. INT 21 - DOS 3.0+ - CREATE TEMPORARY FILE
  8053.     AH = 5Ah
  8054.     CX = file attribute (see #0765 at AX=4301h)
  8055.     DS:DX -> ASCIZ path ending with a '\' + 13 zero bytes to receive the
  8056.         generated filename
  8057. Return: CF clear if successful
  8058.         AX = file handle opened for read/write in compatibility mode
  8059.         DS:DX pathname extended with generated name for temporary file
  8060.     CF set on error
  8061.         AX = error code (03h,04h,05h) (see #1020)
  8062. Desc:    creates a file with a unique name which must be explicitly deleted
  8063. BUGS:    COMPAQ DOS 3.31 hangs if the pathname is at XXXXh:0000h; it apparently
  8064.       wraps around to the end of the segment
  8065.     MS-DOS 5.00 revisions A and B and PC-DOS 5.00 revision A reportedly
  8066.       hang the system if the specified path is the root directory and the
  8067.       root directory is full (no free directory entries)
  8068.     Mark Incley <mincley@krisalis.demon.co.uk> reports that this function
  8069.       hangs in DOS 6.2x if the name includes two consecutive path
  8070.       separators (e.g. C:\\ )
  8071. Notes:    under the FlashTek X-32 DOS extender, the path pointer is in DS:EDX
  8072.     MS-DOS 3.0-4.0 and DR-DOS 3.4-5.0 generate the filename as a sequence
  8073.       of hex digits based on the current date and time; MS-DOS 6+,
  8074.       DR-DOS 6, and Novell DOS 7 use letters A-P in place of hex digits
  8075. SeeAlso: AH=3Ch,AH=5Bh
  8076. --------D-215B-------------------------------
  8077. INT 21 - DOS 3.0+ - CREATE NEW FILE
  8078.     AH = 5Bh
  8079.     CX = file attribute (see #0765 at AX=4301h)
  8080.     DS:DX -> ASCIZ filename
  8081. Return: CF clear if successful
  8082.         AX = file handle opened for read/write in compatibility mode
  8083.     CF set on error
  8084.         AX = error code (03h,04h,05h,50h) (see #1020)
  8085. Notes:    unlike AH=3Ch, this function will fail if the specified file exists
  8086.       rather than truncating it; this permits its use in creating semaphore
  8087.       files because it is an atomic "test and set" operation
  8088.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  8089. SeeAlso: AH=3Ch,AH=5Ah
  8090. --------D-215C-------------------------------
  8091. INT 21 - DOS 3.0+ - "FLOCK" - RECORD LOCKING
  8092.     AH = 5Ch
  8093.     AL = subfunction
  8094.         00h lock region of file
  8095.         01h unlock region of file
  8096.     BX = file handle
  8097.     CX:DX = start offset of region within file
  8098.     SI:DI = length of region in bytes
  8099. Return: CF clear if successful
  8100.     CF set on error
  8101.         AX = error code (01h,06h,21h,24h) (see #1020)
  8102. Notes:    error returned unless SHARE or network installed
  8103.     an unlock call must specify the same region as some prior lock call
  8104.     locked regions become entirely inaccessible to other processes
  8105.     duplicate handles created with AH=45h or AH=46h inherit locks, but
  8106.       handles inherited by child processes (see AH=4Bh) do not
  8107.     under DR DOS 3.41 and 5.0, if a process opens a file without the no-
  8108.       inherit flag and then starts a child, any locks set by the parent
  8109.       are ignored, and the child will only get an error if it tries to
  8110.       lock an area previously locked by the parent process
  8111. SeeAlso: AX=440Bh,AH=BCh,AH=BEh,INT 2F/AX=110Ah,INT 2F/AX=110Bh
  8112. --------D-215D00-----------------------------
  8113. INT 21 U - DOS 3.1+ internal - SERVER FUNCTION CALL
  8114.     AX = 5D00h
  8115.     DS:DX -> DOS parameter list (see #1026)
  8116.     DPL contains all register values for a call to INT 21h
  8117. Return: as appropriate for function being called
  8118. Notes:    does not check AH.  Out of range values will crash the system
  8119.     executes using specified computer ID and process ID
  8120.     sharing delay loops skipped
  8121.     a special sharing mode is enabled to handle FCBs opened across network
  8122.     wildcards are enabled for DELETE (AH=41h) and RENAME (AH=56h) under
  8123.       MS-DOS; under DR DOS 3.41, wildcards corrupt the filesystem; and
  8124.       under DR DOS 5.0-6.0, the call returns error code 03h due to improper
  8125.       support for the server function call (refer to BUGS: section below)
  8126.     an extra file attribute parameter is enabled for OPEN (AH=3Dh),
  8127.       DELETE (AH=41h), and RENAME (AH=56h)
  8128.     functions which take filenames require canonical names (as returned
  8129.       by AH=60h); this is apparently to prevent multi-hop file forwarding
  8130. BUGS:    the OS/2 2.0 DOS Boot Session incorrectly maps DOS drive letters,
  8131.       seemingly ignoring HPFS drives
  8132.     DR DOS 5.0-6.0 merely recursively call INT 21 after loading the
  8133.       registers from the DPL, leading to problems for peer-to-peer
  8134.       networks
  8135. SeeAlso: AH=3Dh,AH=41h,AH=56h,AH=60h
  8136.  
  8137. Format of DOS parameter list:
  8138. Offset    Size    Description    (Table 1026)
  8139.  00h    WORD    AX
  8140.  02h    WORD    BX
  8141.  04h    WORD    CX
  8142.  06h    WORD    DX
  8143.  08h    WORD    SI
  8144.  0Ah    WORD    DI
  8145.  0Ch    WORD    DS
  8146.  0Eh    WORD    ES
  8147.  10h    WORD    reserved (0)
  8148.  12h    WORD    computer ID (0 = current system)
  8149.  14h    WORD    process ID (PSP segment on specified computer)
  8150. Note:    under Windows Enhanced mode, the computer ID is normally the virtual
  8151.       machine ID (see INT 2F/AX=1683h), though this can reportedly be
  8152.       changed by setting UniqueDOSPSP= in SYSTEM.INI
  8153. --------D-215D01-----------------------------
  8154. INT 21 U - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
  8155.     AX = 5D01h
  8156.     DS:DX -> DOS parameter list (see #1026), only computer ID and
  8157.           process ID fields used
  8158. Return: CF set on error
  8159.         AX = error code (see #1020)
  8160.     CF clear if successful
  8161. Notes:    flushes buffers and updates directory entries for each file which has
  8162.       been written to; if remote file, calls INT 2F/AX=1107h
  8163.     the computer ID and process ID are stored but ignored under DOS 3.3
  8164.     not supported by DR DOS 3.41 and 5.0; returns error code 01h
  8165. SeeAlso: AH=0Dh,AH=68h,INT 2F/AX=1107h
  8166. --------D-215D02-----------------------------
  8167. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE FILE BY NAME
  8168.     AX = 5D02h
  8169.     DS:DX -> DOS parameter list (see #1026), only fields DX, DS,
  8170.           computer ID, and process ID used
  8171.     DPL's DS:DX -> ASCIZ name of file to close
  8172. Return: CF set on error
  8173.         AX = error code (see #1020)
  8174.     CF clear if successful
  8175. Notes:    error unless SHARE is loaded (calls [SysFileTable-28h])
  8176.       (see #0977 at AH=52h)
  8177.     name must be canonical fully-qualified, such as returned by AH=60h
  8178.     not supported by DR DOS 3.41 and 5.0; returns error code 01h
  8179.     not supported by Novell DOS 7
  8180. SeeAlso: AX=5D03h,AX=5D04h,AH=3Eh,AH=60h
  8181. --------D-215D03-----------------------------
  8182. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN COMPUTER
  8183.     AX = 5D03h
  8184.     DS:DX -> DOS parameter list (see #1026), only computer ID used
  8185. Return: CF set on error
  8186.         AX = error code (see #1020)
  8187.     CF clear if successful
  8188. Notes:    error unless SHARE is loaded (calls [SysFileTable-30h])
  8189.       (see #0977 at AH=52h)
  8190.     not supported by DR DOS 3.41 and 5.0; returns error code 01h
  8191.     not supported by Novell DOS 7
  8192. SeeAlso: AX=5D02h,AX=5D04h
  8193. --------D-215D04-----------------------------
  8194. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN PROCESS
  8195.     AX = 5D04h
  8196.     DS:DX -> DOS parameter list (see #1026), only computer ID and
  8197.           process ID fields used
  8198. Return: CF set on error
  8199.         AX = error code (see #1020)
  8200.     CF clear if successful
  8201. Notes:    error unless SHARE is loaded (calls [SysFileTable-2Ch])
  8202.        (see #0977 at AH=52h)
  8203.     not supported by DR DOS 3.41 and 5.0; returns error code 01h
  8204.     not supported by Novell DOS 7
  8205. SeeAlso: AX=5D02h,AX=5D03h,INT 2F/AX=111Dh
  8206. --------D-215D05-----------------------------
  8207. INT 21 U - DOS 3.1+ internal - SHARE.EXE - GET OPEN FILE LIST ENTRY
  8208.     AX = 5D05h
  8209.     DS:DX -> DOS parameter list (see #1026)
  8210.     DPL's BX = index of sharing record (see #0978 at AH=52h)
  8211.     DPL's CX = index of SFT in sharing record's SFT list
  8212. Return: CF clear if successful
  8213.         ES:DI -> ASCIZ filename
  8214.         BX = network machine number of SFT's owner
  8215.         CX = number of locks held by SFT's owner
  8216.     CF set if either index out of range
  8217.         AX = 0012h (no more files)
  8218. Notes:    error unless SHARE is loaded (calls [SysFileTable-18h])
  8219.       (see #0977 at AH=52h)
  8220.     names are always canonical fully-qualified, such as returned by AH=60h
  8221.     not supported by DR DOS 3.41 and 5.0 and Novell DOS 7, but does not
  8222.       return an error, instead destroying AX
  8223. SeeAlso: AH=5Ch,AH=60h
  8224. --------D-215D06-----------------------------
  8225. INT 21 U - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
  8226.     AX = 5D06h
  8227. Return: CF set on error
  8228.        AX = error code (see #1020)
  8229.     CF clear if successful
  8230.         DS:SI -> nonreentrant data area (includes all three DOS stacks)
  8231.         (critical error flag is first byte) (see #1027)
  8232.         CX = size in bytes of area which must be swapped while in DOS
  8233.         DX = size in bytes of area which must always be swapped
  8234. Notes:    the Critical Error flag is used in conjunction with the InDOS flag
  8235.       (see AH=34h) to determine when it is safe to enter DOS from a TSR
  8236.     setting CritErr flag allows use of functions 50h/51h from INT 28h under
  8237.       DOS 2.x by forcing use of correct stack
  8238.     swapping the data area allows reentering DOS unless DOS is in a
  8239.       critical section delimited by INT 2A/AH=80h and INT 2A/AH=81h,82h
  8240.     under DOS 4.0, AX=5D0Bh should be used instead of this function
  8241.     SHARE and other DOS utilities consult the byte at offset 04h in the
  8242.       DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
  8243.       in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
  8244.     DR DOS 3.41+ supports this function, but the SDA format beyond the
  8245.       first 18h bytes is completely different from MS-DOS
  8246. SeeAlso: AX=5D0Bh,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h
  8247.  
  8248. Format of DOS 3.10-3.30 Swappable Data Area:
  8249. Offset    Size    Description    (Table 1027)
  8250.  -34    BYTE    (DOS 3.10+) printer echo flag (00h off, FFh active)
  8251.  -31    BYTE    (DOS 3.30) current switch character
  8252.  -30    BYTE    current memory allocation strategy (see AH=58h)
  8253.  -28    BYTE    (DOS 3.30) incremented on each INT 21/AX=5E01h call
  8254.  -27 16 BYTEs    (DOS 3.30) machine name set by INT 21/AX=5E01h
  8255.  -11  5 WORDs    zero-terminated list of offsets which need to be patched to
  8256.           enable critical-section calls (see INT 2A/AH=80h)
  8257.  -1    BYTE    unused padding
  8258. ---start of actual SDA---
  8259.  00h    BYTE    critical error flag ("ErrorMode")
  8260.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  8261.  02h    BYTE    drive on which current critical error occurred, or FFh
  8262.         (DR DOS sets to drive number during INT 24, 00h otherwise)
  8263.  03h    BYTE    locus of last error
  8264.  04h    WORD    extended error code of last error
  8265.  06h    BYTE    suggested action for last error
  8266.  07h    BYTE    class of last error
  8267.  08h    DWORD    ES:DI pointer for last error
  8268.  0Ch    DWORD    current DTA (Disk Transfer Address)
  8269.         note: may point into SDA during the DOS EXEC function
  8270.           (see AH=4Bh), so programs which swap the SDA must be
  8271.           prepared to move the DTA to a private buffer if they
  8272.           might be invoked during an EXEC
  8273.  10h    WORD    current PSP
  8274.  12h    WORD    stores SP across an INT 23
  8275.  14h    WORD    return code from last process termination (zerod after reading
  8276.           with AH=4Dh)
  8277.  16h    BYTE    current drive
  8278.  17h    BYTE    extended break flag
  8279. ---remainder need only be swapped if in DOS---
  8280.  18h    WORD    value of AX on call to INT 21
  8281.  1Ah    WORD    PSP segment for sharing/network
  8282.  1Ch    WORD    network machine number for sharing/network (0000h = us)
  8283.  1Eh    WORD    first usable memory block found when allocating memory
  8284.  20h    WORD    best usable memory block found when allocating memory
  8285.  22h    WORD    last usable memory block found when allocating memory
  8286.  24h    WORD    memory size in paragraphs (used only during initialization)
  8287.  26h    WORD    last entry checked during directory search
  8288.  28h    BYTE    flag: INT 24 returned Fail
  8289.  29h    BYTE    flags: allowable INT 24 actions (passed to INT 24 in AH)
  8290.  2Ah    BYTE    directory flag (00h directory, 01h file)
  8291.  2Bh    BYTE    flag: FFh if Ctrl-Break termination, 00h otherwise
  8292.  2Ch    BYTE    flag: allow embedded blanks in FCB
  8293.  2Dh    BYTE    padding (unused)
  8294.  2Eh    BYTE    day of month
  8295.  2Fh    BYTE    month
  8296.  30h    WORD    year - 1980
  8297.  32h    WORD    number of days since 1-1-1980
  8298.  34h    BYTE    day of week (0 = Sunday)
  8299.  35h    BYTE    flag: console swapped during read from device
  8300.  36h    BYTE    flag: safe to call INT 28 if nonzero
  8301.  37h    BYTE    flag: if nonzero, INT 24 Abort turned into INT 24 Fail
  8302.         (set only during process termination)
  8303.  38h 26 BYTEs    device driver request header (see #1931 at INT 2F/AX=0802h)
  8304.  52h    DWORD    pointer to device driver entry point (used in calling driver)
  8305.  56h 22 BYTEs    device driver request header for I/O calls
  8306.  6Ch 14 BYTEs    device driver request header for disk status check
  8307.  7Ah    DWORD    pointer to device I/O buffer???
  8308.  7Eh    WORD    ???
  8309.  80h    WORD    ???
  8310.  82h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  8311.  83h    BYTE    padding (unused)
  8312.  84h  3 BYTEs    24-bit user number (see AH=30h)
  8313.  87h    BYTE    OEM number (see #0741 at AH=30h)
  8314.  88h    WORD    offset to error code conversion table for INT 25/INT 26
  8315.  8Ah  6 BYTEs    CLOCK$ transfer record (see #1028)
  8316.  90h    BYTE    device I/O buffer for single-byte I/O functions
  8317.  91h    BYTE    padding??? (unused)
  8318.  92h 128 BYTEs    buffer for filename
  8319. 112h 128 BYTEs    buffer for filename
  8320. 192h 21 BYTEs    findfirst/findnext search data block (see #0967 at AH=4Eh)
  8321. 1A7h 32 BYTEs    directory entry for found file (see #0700 at AH=11h)
  8322. 1C7h 81 BYTEs    copy of current directory structure for drive being accessed
  8323. 218h 11 BYTEs    FCB-format filename for device name comparison
  8324. 223h    BYTE    terminating NUL for above filename
  8325. 224h 11 BYTEs    wildcard destination specification for rename (FCB format)
  8326. 22Fh    BYTE    terminating NUL for above spec
  8327. 230h    BYTE    ???
  8328. 231h    WORD    destination file/directory starting sector
  8329. 233h  5 BYTEs    ???
  8330. 238h    BYTE    extended FCB file attribute
  8331. 239h    BYTE    type of FCB (00h regular, FFh extended)
  8332. 23Ah    BYTE    directory search attributes
  8333. 23Bh    BYTE    file open/access mode
  8334. 23Ch    BYTE    file found/delete flag
  8335.         bit 0: file found
  8336.         bit 4: file deleted
  8337. 23Dh    BYTE    flag: device name found on rename, or file not found
  8338. 23Eh    BYTE    splice flag (file name and directory name together)
  8339. 23Fh    BYTE    flag indicating how DOS function was invoked
  8340.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  8341. 240h    BYTE    sector position within cluster
  8342. 241h    BYTE    flag: translate sector/cluster (00h no, 01h yes)
  8343. 242h    BYTE    flag: 00h if read, 01h if write
  8344. 243h    BYTE    current working drive number
  8345. 244h    BYTE    cluster factor
  8346. 245h    BYTE    flag: cluster split mode
  8347. 246h    BYTE    line edit (AH=0Ah) insert mode flag (nonzero = on)
  8348. 247h    BYTE    canonicalized filename referred to existing file/dir if FFh
  8349. 248h    BYTE    volume ID flag
  8350. 249h    BYTE    type of process termination (00h-03h) (see AH=4Dh)
  8351. 24Ah    BYTE    file create flag (00h = no, search only)
  8352. 24Bh    BYTE    value with which to replace first byte of deleted file's name
  8353.           (normally E5h, but 00h as described under INT 21/AH=13h)
  8354. 24Ch    DWORD    pointer to Drive Parameter Block for critical error invocation
  8355.         temp: used during process termination
  8356. 250h    DWORD    pointer to stack frame containing user registers on INT 21
  8357. 254h    WORD    stores SP across INT 24
  8358. 256h    DWORD    pointer to DOS Drive Parameter Block for ???
  8359. 25Ah    WORD    saving partial cluster number
  8360. 25Ch    WORD    temp: sector of work current cluster
  8361. 25Eh    WORD    high part of cluster number (only low byte referenced)
  8362. 260h    WORD    ??? temp
  8363. 262h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  8364. 263h    BYTE    padding (unused)
  8365. 264h    DWORD    pointer to device header when filename is character device
  8366. 268h    DWORD    pointer to current SFT
  8367. 26Ch    DWORD    pointer to current directory structure for drive being accessed
  8368. 270h    DWORD    pointer to caller's FCB
  8369. 274h    WORD    number of SFT to which file being opened will refer
  8370. 276h    WORD    temporary storage for file handle
  8371. 278h    DWORD    pointer to a JFT entry in process handle table
  8372.           (see #0725 at AH=26h)
  8373. 27Ch    WORD    offset in DOS DS of first filename argument
  8374. 27Eh    WORD    offset in DOS DS of second filename argument
  8375. 280h    WORD    offset of last component in pathname or FFFFh
  8376. 282h    WORD    offset of transfer address to add
  8377. 284h    WORD    last relative cluster within file being accessed
  8378. 286h    WORD    temp: absolute cluster number being accessed
  8379. 288h    WORD    directory sector number
  8380. 28Ah    WORD    ??? current cluster number
  8381. 28Ch    WORD    current relative sector number within file
  8382. 28Eh    WORD    current sector number
  8383. 290h    WORD    current byte offset within sector
  8384. 292h    DWORD    current offset in file
  8385. 296h    DWORD    temp: file byte count
  8386. 29Ah    WORD    temp: file byte count
  8387. 29Ch    WORD    free file cluster entry
  8388. 29Eh    WORD    last file cluster entry
  8389. 2A0h    WORD    next file cluster number
  8390. 2A2h    DWORD    number of bytes appended to file
  8391. 2A6h    DWORD    pointer to current work disk buffer
  8392. 2AAh    DWORD    pointer to working SFT
  8393. 2AEh    WORD    used by INT 21 dispatcher to store caller's BX
  8394. 2B0h    WORD    used by INT 21 dispatcher to store caller's DS
  8395. 2B2h    WORD    temporary storage while saving/restoring caller's registers
  8396. 2B4h    DWORD    pointer to prev call frame (offset 250h) if INT 21 reentered
  8397.         also switched to for duration of INT 24
  8398. 2B8h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  8399.         (see #0967 at AH=4Eh)
  8400. 2CDh 32 BYTEs    directory entry for file being renamed (see #0700 at AH=11h)
  8401. 2EDh 331 BYTEs    critical error stack
  8402.    403h     35 BYTEs scratch SFT
  8403. 438h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  8404. 5B8h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  8405. ---DOS 3.2,3.3x only---
  8406. 738h    BYTE    device driver lookahead flag (usually printer)
  8407.         (see AH=64h"DOS 3.2+")
  8408. 739h    BYTE    volume change flag
  8409. 73Ah    BYTE    flag: virtual open
  8410. 73Bh    BYTE    ???
  8411. SeeAlso: #1030
  8412.  
  8413. Format of CLOCK$ transfer record:
  8414. Offset    Size    Description    (Table 1028)
  8415.  00h    WORD    number of days since 1-Jan-1980
  8416.  02h    BYTE    minutes
  8417.  03h    BYTE    hours
  8418.  04h    BYTE    hundredths of second
  8419.  05h    BYTE    seconds
  8420. --------D-215D07-----------------------------
  8421. INT 21 U - DOS 3.1+ network - GET REDIRECTED PRINTER MODE
  8422.     AX = 5D07h
  8423. Return: DL = mode
  8424.         00h redirected output is combined
  8425.         01h redirected output in separate print jobs
  8426. SeeAlso: AX=5D08h,AX=5D09h,INT 2F/AX=1125h
  8427. --------D-215D08-----------------------------
  8428. INT 21 U - DOS 3.1+ network - SET REDIRECTED PRINTER MODE
  8429.     AX = 5D08h
  8430.     DL = mode
  8431.         00h redirected output is combined
  8432.         01h redirected output placed in separate jobs, start new print job
  8433.         now
  8434. SeeAlso: AX=5D07h,AX=5D09h,INT 2F/AX=1125h
  8435. --------D-215D09-----------------------------
  8436. INT 21 U - DOS 3.1+ network - FLUSH REDIRECTED PRINTER OUTPUT
  8437.     AX = 5D09h
  8438. Notes:    forces redirected printer output to be printed, and starts a new print
  8439.       job
  8440.     this function is also supported by 10Net, which calls it Terminate All
  8441.       Spool Jobs, and does not flush if in "combine" mode
  8442. SeeAlso: AX=5D07h,AX=5D08h,INT 2F/AX=1125h
  8443. --------D-215D0A-----------------------------
  8444. INT 21 - DOS 3.1+ - SET EXTENDED ERROR INFORMATION
  8445.     AX = 5D0Ah
  8446.     DS:DX -> 11-word DOS parameter list (see #1026)
  8447. Return: nothing.  next call to AH=59h will return values from fields AX,BX,CX,
  8448.       DX,DI, and ES in corresponding registers
  8449. Notes:    documented for DOS 5+, but undocumented in earlier versions
  8450.     the MS-DOS Programmer's Reference incorrectly states that this call was
  8451.       introduced in DOS 4, and fails to mention that the ERROR structure
  8452.       passed to this function is a DOS parameter list.
  8453. BUGS:    DR DOS 3.41 and 5.0 read the value for ES from the DS field of the
  8454.       DPL; fortunately, MS-DOS ignores the DS field, allowing a generic
  8455.       routine which sets both DS and ES fields to the same value
  8456.     Novell DOS 7 does not save the pointer, which is always reported as
  8457.       0000h:0000h by AH=59h
  8458. SeeAlso: AH=59h/BX=0000h
  8459. --------D-215D0B-----------------------------
  8460. INT 21 OU - DOS 4.x only internal - GET DOS SWAPPABLE DATA AREAS
  8461.     AX = 5D0Bh
  8462. Return: CF set on error
  8463.         AX = error code (see #1020)
  8464.     CF clear if successful
  8465.         DS:SI -> swappable data area list (see #1029)
  8466. Notes:    copying and restoring the swappable data areas allows DOS to be
  8467.       reentered unless it is in a critical section delimited by calls to
  8468.       INT 2A/AH=80h and INT 2A/AH=81h,82h
  8469.     SHARE and other DOS utilities consult the byte at offset 04h in the
  8470.       DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
  8471.       in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
  8472.     DOS 5+ use the SDA format listed below, but revert back to the DOS 3.x
  8473.       call for finding the SDA (see #1027)
  8474. SeeAlso: AX=5D06h,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h,INT 2F/AX=1203h
  8475.  
  8476. Format of DOS 4.x swappable data area list:
  8477. Offset    Size    Description    (Table 1029)
  8478.  00h    WORD    count of data areas
  8479.  02h  N BYTEs    "count" copies of data area record
  8480.         Offset    Size    Description
  8481.          00h    DWORD    address
  8482.          04h    WORD    length and type
  8483.                 bit 15 set if swap always, clear if swap in DOS
  8484.                 bits 14-0: length in bytes
  8485. SeeAlso: #1030
  8486.  
  8487. Format of DOS 4.0-6.0 swappable data area:
  8488. Offset    Size    Description    (Table 1030)
  8489.  -34    BYTE    printer echo flag (00h off, FFh active)
  8490.  -31    BYTE    current switch character (ignored by DOS 5+)
  8491.  -30    BYTE    current memory allocation strategy (see AH=58h)
  8492.  -28    BYTE    incremented on each INT 21/AX=5E01h call
  8493.  -27 16 BYTEs    machine name set by INT 21/AX=5E01h
  8494.  -11  5 WORDs    zero-terminated list of offsets which need to be patched to
  8495.           enable critical-section calls (see INT 2A/AH=80h)
  8496.         (all offsets are 0D0Ch, but this list is still present for
  8497.           DOS 3.x compatibility)
  8498.  -1    BYTE    unused padding
  8499. ---start of actual SDA---
  8500.  00h    BYTE    critical error flag ("ErrorMode")
  8501.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  8502.  02h    BYTE    drive on which current critical error occurred or FFh
  8503.  03h    BYTE    locus of last error
  8504.  04h    WORD    extended error code of last error
  8505.  06h    BYTE    suggested action for last error
  8506.  07h    BYTE    class of last error
  8507.  08h    DWORD    ES:DI pointer for last error
  8508.  0Ch    DWORD    current DTA (Disk Transfer Address)
  8509.         note: may point into SDA during the DOS EXEC function
  8510.           (see AH=4Bh), so programs which swap the SDA must be
  8511.           prepared to move the DTA to a private buffer if they
  8512.           might be invoked during an EXEC
  8513.  10h    WORD    current PSP
  8514.  12h    WORD    stores SP across an INT 23
  8515.  14h    WORD    return code from last process termination (zerod after reading
  8516.           with AH=4Dh)
  8517.  16h    BYTE    current drive
  8518.  17h    BYTE    extended break flag
  8519.  18h    BYTE    flag: code page switching
  8520.  19h    BYTE    flag: copy of previous byte in case of INT 24 Abort
  8521. ---remainder need only be swapped if in DOS---
  8522.  1Ah    WORD    value of AX on call to INT 21
  8523.  1Ch    WORD    PSP segment for sharing/network
  8524.  1Eh    WORD    network machine number for sharing/network (0000h = us)
  8525.  20h    WORD    first usable memory block found when allocating memory
  8526.  22h    WORD    best usable memory block found when allocating memory
  8527.  24h    WORD    last usable memory block found when allocating memory
  8528.  26h    WORD    memory size in paragraphs (used only during initialization)
  8529.  28h    WORD    last entry checked during directory search
  8530.  2Ah    BYTE    flag: nonzero if INT 24 Fail
  8531.  2Bh    BYTE    flags: allowable INT 24 responses (passed to INT 24 in AH)
  8532.  2Ch    BYTE    flag: do not set directory if nonzero
  8533.  2Dh    BYTE    flag: program aborted by ^C
  8534.  2Eh    BYTE    flag: allow embedded blanks in FCB
  8535.         may also allow use of "*" wildcard in FCBs
  8536.  2Fh    BYTE    padding (unused)
  8537.  30h    BYTE    day of month
  8538.  31h    BYTE    month
  8539.  32h    WORD    year - 1980
  8540.  34h    WORD    number of days since 1-1-1980
  8541.  36h    BYTE    day of week (0 = Sunday)
  8542.  37h    BYTE    flag: console swapped during read from device
  8543.  38h    BYTE    flag: safe to call INT 28 if nonzero
  8544.  39h    BYTE    flag: abort currently in progress, turn INT 24 Abort into Fail
  8545.  3Ah 30 BYTEs    device driver request header (see #1931 at INT 2F/AX=0802h) for
  8546.           device calls
  8547.  58h    DWORD    pointer to device driver entry point (used in calling driver)
  8548.  5Ch 22 BYTEs    device driver request header for I/O calls
  8549.  72h 14 BYTEs    device driver request header for disk status check
  8550.  80h    DWORD    pointer to device I/O buffer
  8551.  84h    WORD    ???
  8552.  86h    WORD    ??? (0)
  8553.  88h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  8554.  89h    DWORD    start offset of file region to lock/unlock
  8555.  8Dh    DWORD    length of file region to lock/unlock
  8556.  91h    BYTE    padding (unused)
  8557.  92h  3 BYTEs    24-bit user number (see AH=30h)
  8558.  95h    BYTE    OEM number (see #0741 at AH=30h)
  8559.  96h  6 BYTEs    CLOCK$ transfer record (see #1028 at AX=5D06h)
  8560.  9Ch    BYTE    device I/O buffer for single-byte I/O functions
  8561.  9Dh    BYTE    padding???
  8562.  9Eh 128 BYTEs    buffer for filename
  8563. 11Eh 128 BYTEs    buffer for filename
  8564. 19Eh 21 BYTEs    findfirst/findnext search data block (see #0967 at AH=4Eh)
  8565. 1B3h 32 BYTEs    directory entry for found file (see #0741 at AH=11h)
  8566. 1D3h 88 BYTEs    copy of current directory structure for drive being accessed
  8567. 22Bh 11 BYTEs    FCB-format filename for device name comparison
  8568. 236h    BYTE    terminating NUL for above filename
  8569. 237h 11 BYTEs    wildcard destination specification for rename (FCB format)
  8570. 242h    BYTE    terminating NUL for above filespec
  8571. 243h    BYTE    ???
  8572. 244h    WORD    ???
  8573. 246h  5 BYTEs    ???
  8574. 24Bh    BYTE    extended FCB file attributes
  8575. 24Ch    BYTE    type of FCB (00h regular, FFh extended)
  8576. 24Dh    BYTE    directory search attributes
  8577. 24Eh    BYTE    file open/access mode
  8578. 24Fh    BYTE    ??? flag bits
  8579.         reportedly 00h when deleting a file under MSDOS 5.0
  8580. 250h    BYTE    flag: device name found on rename, or file not found
  8581. 251h    BYTE    splice flag??? (file name and directory name together)
  8582. 252h    BYTE    flag indicating how DOS function was invoked
  8583.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  8584. 253h    BYTE    sector position within cluster
  8585. 254h    BYTE    ??? (flag: translate sector/cluster)
  8586. 255h    BYTE    ??? (flag: 00h if read, 01h if write)
  8587. 256h    BYTE    current working drive number
  8588. 257h    BYTE    cluster factor
  8589. 258h    BYTE    ???
  8590. 259h    BYTE    line edit (AH=0Ah) insert mode flag (nonzero = on)
  8591. 25Ah    BYTE    canonicalized filename referred to existing file/dir if FFh
  8592. 25Bh    BYTE    volume ID flag
  8593. 25Ch    BYTE    type of process termination (00h-03h) (see AH=4Dh)
  8594. 25Dh    BYTE    ???
  8595. 25Eh    BYTE    ??? file create flag (00h = no, search only)
  8596. 25Fh    BYTE    ??? (value for deleted file's first byte)
  8597. 260h    DWORD    pointer to Drive Parameter Block for critical error invocation
  8598. 264h    DWORD    pointer to stack frame containing user registers on INT 21
  8599. 268h    WORD    stores SP across INT 24
  8600. 26Ah    DWORD    pointer to DOS Drive Parameter Block for ???
  8601. 26Eh    WORD    segment of disk buffer
  8602. 270h    WORD    ??? (saving partial cluster number)
  8603. 272h    WORD    ??? (temp: sector of work current cluster)
  8604. 274h    WORD    ??? (high part of cluster number)
  8605. 276h    WORD    ??? (temp)
  8606. 278h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  8607. 279h    BYTE    ??? (doesn't seem to be referenced)
  8608. 27Ah    DWORD    pointer to device header if filename is character device
  8609. 27Eh    DWORD    pointer to current SFT
  8610. 282h    DWORD    pointer to current directory structure for drive being accessed
  8611. 286h    DWORD    pointer to caller's FCB
  8612. 28Ah    WORD    SFT index to which file being opened will refer
  8613. 28Ch    WORD    temporary storage for file handle
  8614. 28Eh    DWORD    pointer to a JFT entry in process handle table
  8615.           (see #0725 at AH=26h)
  8616. 292h    WORD    offset in DOS DS of first filename argument
  8617. 294h    WORD    offset in DOS DS of second filename argument
  8618. 296h    WORD    ??? (offset of last component in pathname or FFFFh)
  8619. 298h    WORD    offset of transfer address to add
  8620. 29Ah    WORD    last relative cluster within file being accessed
  8621. 29Ch    WORD    temp: absolute cluster number being accessed
  8622. 29Eh    WORD    directory sector number
  8623. 2A0h    WORD    ???
  8624. 2A2h    WORD    ??? directory cluster number
  8625. 2A4h    DWORD    current relative sector number within file
  8626. 2A8h    DWORD    ??? (current sector number)
  8627. 2ACh    WORD    ??? (current byte offset within sector)
  8628. 2AEh    DWORD    current offset in file
  8629. 2B2h    WORD    ???
  8630. 2B4h    WORD    bytes in partial sector
  8631. 2B6h    WORD    number of sectors
  8632. 2B8h    WORD    ??? (free file cluster entry)
  8633. 2BAh    WORD    ??? (last file cluster entry)
  8634. 2BCh    WORD    ??? (next file cluster number)
  8635. 2BEh    DWORD    number of bytes appended to file
  8636. 2C2h    DWORD    pointer to current work disk buffer
  8637. 2C6h    DWORD    pointer to working SFT
  8638. 2CAh    WORD    used by INT 21 dispatcher to store caller's BX
  8639. 2CCh    WORD    used by INT 21 dispatcher to store caller's DS
  8640. 2CEh    WORD    temporary storage while saving/restoring caller's registers
  8641. 2D0h    DWORD    pointer to prev call frame (offset 264h) if INT 21 reentered
  8642.         also switched to for duration of INT 24
  8643. 2D4h    WORD    open mode/action for INT 21/AX=6C00h
  8644. 2D6h    BYTE    ??? (set to 00h by INT 21h dispatcher, 02h when a read is
  8645.           performed, and 01h or 03h by INT 21/AX=6C00h)
  8646. 2D7h    WORD    ??? apparently unused
  8647. 2D9h    DWORD    stored ES:DI for AX=6C00h
  8648. 2DDh    WORD    extended file open action code (see #1112 at AX=6C00h)
  8649. 2DFh    WORD    extended file open attributes (see #1111 at AX=6C00h)
  8650. 2E1h    WORD    extended file open file mode (see AX=6C00h)
  8651. 2E3h    DWORD    pointer to filename to open (see AX=6C00h)
  8652. 2E7h    WORD    ??? temp DX storage or 0000h or temp data buffer size from
  8653.           disk buffer
  8654. 2E9h    WORD    ???
  8655. 2EBh    BYTE    ???
  8656. 2ECh    WORD    stores DS during call to [List-of-Lists + 37h]
  8657. 2EEh    WORD    ???
  8658. 2F0h    BYTE    ???
  8659. 2F1h    WORD    ??? bit flags
  8660. 2F3h    DWORD    pointer to user-supplied filename
  8661. 2F7h    DWORD    pointer to ???
  8662. 2FBh    WORD    stores SS during call to [List-of-Lists + 37h]
  8663. 2FDh    WORD    stores SP during call to [List-of-Lists + 37h]
  8664. 2FFh    BYTE    flag, nonzero if stack switched in calling [List-of-Lists+37h]
  8665. 300h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  8666.         (see #0967 at AH=4Eh)
  8667. 315h 32 BYTEs    directory entry for file being renamed (see #0700 at AH=11h)
  8668. 335h 331 BYTEs    critical error stack
  8669. 480h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  8670. 600h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  8671. 780h    BYTE    device driver lookahead flag (usually printer)
  8672.         (see AH=64h"DOS 3.2+")
  8673. 781h    BYTE    volume change flag
  8674. 782h    BYTE    flag: virtual open
  8675. 783h    BYTE    ???
  8676. 784h    WORD    ???
  8677. 786h    WORD    ???
  8678. 788h    WORD    ???
  8679. 78Ah    WORD    ???
  8680. SeeAlso: #1027,#1029
  8681. --------D-215E00-----------------------------
  8682. INT 21 - DOS 3.1+ network - GET MACHINE NAME
  8683.     AX = 5E00h
  8684.     DS:DX -> 16-byte buffer for ASCII machine name
  8685. Return: CF clear if successful
  8686.         CH = validity
  8687.         00h name invalid
  8688.         nonzero valid
  8689.             CL = NetBIOS number for machine name
  8690.             DS:DX buffer filled with blank-paded name
  8691.     CF set on error
  8692.         AX = error code (01h) (see #1020 at AH=59h)
  8693. Note:    supported by OS/2 v1.3+ compatibility box, PC-NFS
  8694. SeeAlso: AX=5E01h
  8695. --------N-215E00-----------------------------
  8696. INT 21 - 10NET v5.0 - GET MACHINE NAME
  8697.     AX = 5E00h
  8698. Return: CL = redirector's NetBIOS name number
  8699.     ES:DI -> network node ID
  8700. SeeAlso: AX=5E01h"10NET"
  8701. --------D-215E01CH00-------------------------
  8702. INT 21 - DOS 3.1+ network - SET MACHINE NAME
  8703.     AX = 5E01h
  8704.     CH = 00h undefine name (make it invalid)
  8705.        <> 0     define name
  8706.     CL = name number
  8707.     DS:DX -> 15-character blank-padded ASCIZ name
  8708. SeeAlso: AX=5E00h
  8709. --------N-215E01-----------------------------
  8710. INT 21 - 10NET v5.0 - GET LOCAL 10NET CONFIGURATION TABLE
  8711.     AX = 5E01h
  8712.     CX = length of buffer
  8713.     DS:DX -> buffer for 10Net configuration table (see #1031)
  8714. Return: DS:DX buffer filled
  8715. SeeAlso: AX=5E00h"10NET",INT 6F/AH=02h,INT 6F/AH=03h
  8716.  
  8717. Format of 10Net Configuration Table:
  8718. Offset    Size    Description    (Table 1031)
  8719.  00h  8 BYTEs    user name
  8720.  08h 15 BYTEs    node ID
  8721.  17h  3 BYTEs    unique portion of Ethernet address
  8722.  1Ah    BYTE    Who group number
  8723.  1Bh    WORD    services mask (see #1033)
  8724.  1Dh    DWORD    serial number
  8725.  21h    BYTE    maximum concurrent users with same serial number allowed on net
  8726.  22h    BYTE    chat mask (see #1034)
  8727.  23h    BYTE    internal system bits (see #1035)
  8728.  24h  9 BYTEs    version number in format MM.mm.xxx
  8729.  2Dh    BYTE    flag: 01h if machine is a PS/2
  8730.  2Eh    BYTE    flag: 03h if 80386
  8731.  2Fh    BYTE    spool termination mode: 01h concatenate, 02h truncate
  8732.         (see AX=5D09h)
  8733.  30h    WORD    autospool timeout in clock ticks
  8734.  32h    WORD    monitor timeout in clock ticks
  8735.  34h    WORD    unused
  8736.  36h    WORD    chat timeout in clock ticks
  8737.  38h    WORD    netBIOS session timeout in half-seconds
  8738.  3Ah    WORD    datagram send timeout in seconds
  8739.  3Ch    WORD    keyboard value for initiating chat mode
  8740.  3Eh    WORD    Who timeout in clock ticks
  8741.  40h    BYTE    flag: 01h if server should process rom NetBIOS Post return
  8742.  41h    BYTE    flag: 01h if FCBs should be recycled
  8743.  42h  3 BYTEs    signature "DBG"
  8744.  45h    BYTE    last interrupt (21h or 6Fh)
  8745.  46h    BYTE    last INT 21 AH value
  8746.  47h    BYTE    last INT 6F AH value
  8747.  48h    WORD    last item posted
  8748.  4Ah    WORD    last item free-posted
  8749.  4Ch    WORD    last item handled by server
  8750.  4Eh    WORD    last redirector send NCB
  8751.  50h    WORD    last redirector receive NCB
  8752.  52h  4 BYTEs    signature "TABL"
  8753.  56h    WORD    offset of datagram buffer table header (see #1032)
  8754.  58h    WORD    offset of chat buffer table header (see #1032)
  8755.  5Ah    WORD    offset of Raw buffer table header (see #1032)
  8756.  5Ch    WORD    offset of Workstation buffer table header (see #1032)
  8757.  5Eh    WORD    offset of server receive-any table header (see #1032)
  8758.  60h    WORD    offset of Tiny buffer table header (see #1032)
  8759.  62h    WORD    offset of zero-length buffer table (NCBs) (see #1032)
  8760.  64h    WORD    offset of Rdr (Redirector Mount) table header (see #1032)
  8761.  66h    WORD    offset of Ntab (Redirector Session) table header (see #1032)
  8762.  68h    WORD    offset of FCB table header (see #1032)
  8763.  6Ah    WORD    offset of user file handle table header (see #1032)
  8764.  6Ch    WORD    offset of workstation printer RDR extension table header
  8765.  6Eh    WORD    offset of server shared device table header (see #1032)
  8766.  70h    WORD    offset of server connection table header (see #1032)
  8767.  72h    WORD    offset of server login table header (see #1032)
  8768.  74h    WORD    offset of server file table header (see #1032)
  8769.  76h    WORD    offset of server shared file table header (see #1032)
  8770.  78h    WORD    offset of server record lock table header (see #1032)
  8771.  7Ah    WORD    offset of remote printer claim table header (see #1032)
  8772.  7Ch    WORD    offset of remote printer device table header (see #1032)
  8773.  7Eh    WORD    offset of print server mount table header (see #1032)
  8774.  80h    WORD    offset of print server sessions table header (see #1032)
  8775.  82h    WORD    offset of print server print job structure table header
  8776.  84h    WORD    offset of print server pooled device table header (see #1032)
  8777.  86h    WORD    size of workstation buffer
  8778.  88h    WORD    size of server receive-any buffer
  8779.  8Ah    WORD    size of server raw I/O buffer
  8780.  8Ch  6 BYTEs    reserved
  8781.  92h    DWORD    pointer to profile pathname
  8782.  96h    BYTE    datagram retry count
  8783.  97h    BYTE    NetBIOS LAN adapter number
  8784.  98h  6 BYTEs    physical Ethernet address
  8785.  9Eh    BYTE    NetBIOS server name number
  8786.  9Fh    BYTE    NetBIOS redirector name number
  8787.  A0h    BYTE    10Net interrupt number
  8788.  A1h    BYTE    flag: chat is loaded
  8789.  A2h    BYTE    flag: INT 6F APIs permanently loaded
  8790.  A3h    BYTE    flag: file security present
  8791.  A4h    WORD    reserved
  8792.  A6h    BYTE    fixed mount bitmask for drives A:-H:
  8793.  A7h    BYTE    reserved
  8794.  A8h    WORD    10Net system flags (see #1036)
  8795.  AAh    BYTE    monitor flags (see #1037)
  8796.  ABh  5 BYTEs    reserved
  8797.  B0h    WORD    offset of monitor timer block
  8798.  B2h    WORD    offset of server timer block
  8799.  B4h    WORD    offset of chat timer block
  8800.  B6h    WORD    timer chain
  8801.  B8h  4 BYTEs    signature "TALS"
  8802.  BCh    WORD    number of 10Net sends
  8803.  BEh    WORD    number of 10Net receives
  8804.  C0h    WORD    number of no-buffer conditions
  8805.  C2h    WORD    number of dropped posted messages
  8806.  C4h    WORD    number of server NCB errors
  8807.  C6h    WORD    number of redirector NCB errors
  8808.  C8h    WORD    number of datagram send/receive errors
  8809.  CAh    WORD    number of dropped Whos
  8810.  CCh    WORD    number of dropped submits
  8811.  CEh    WORD    number of session aborts
  8812.  D0h    BYTE    number of NetBIOS interface-busy errors
  8813.  D1h    BYTE    last NetBIOS bad post command
  8814.  D2h    BYTE    last NetBIOS bad redirector command
  8815.  D3h    BYTE    do send datagram send/receive error command
  8816.  D4h    DWORD    -> DOS system parameter table
  8817.  D8h    WORD    number of DOS physical drives
  8818.  DAh    WORD    offset of DOS PSP field in DOS data segment
  8819.  DCh    WORD    offset of in-DOS flag in DOS data segment
  8820.  DEh    WORD    DOS data segment
  8821.  E0h    WORD    offset of DOS SFT in DOS data segment
  8822.  E2h    WORD    offset of number-of-physical-units field in DOS data segment
  8823.  E4h    WORD    10Net code segment
  8824.  E6h    WORD    10Net data segment
  8825.  E8h    WORD    10Net common server segment
  8826.  EAh    WORD    10Net file server segment
  8827.  ECh    WORD    10Net print server segment
  8828.  EEh    WORD    10Net remote printer segment
  8829. Note:    documentation lists field at offset D0h as a WORD, but all following
  8830.       offsets are as though it were a BYTE; if it is indeed a WORD, all
  8831.       offsets after D0h must be increased by one byte
  8832.  
  8833. Format of 10Net Table Header:
  8834. Offset    Size    Description    (Table 1032)
  8835.  -16  4 BYTEs    table identifier
  8836.  -12    WORD    peak number of tables allocated
  8837.  -10    WORD    number of tables currently in use
  8838.  -8    WORD    total number of tables
  8839.  -6    WORD    size of each table
  8840.  -4    WORD    offset of first allocated table
  8841.  -2    WORD    offset of first free table
  8842.  
  8843. Bitfields for 10NET services mask:
  8844. Bit(s)    Description    (Table 1033)
  8845.  0    workstation
  8846.  1    file server
  8847.  2    print queue server
  8848.  3    de-spool server
  8849.  
  8850. Bitfields for 10NET chat mask:
  8851. Bit(s)    Description    (Table 1034)
  8852.  0    chat permitted
  8853.  1    bell enabled
  8854.  2    chat keyboard initiated
  8855.  3    in INT 16 handler
  8856.  4    in Get Input
  8857.  5    display has timed out
  8858.  6    chat is idle
  8859.  
  8860. Bitfields for 10NET internal system bits:
  8861. Bit(s)    Description    (Table 1035)
  8862.  0    submit permitted
  8863.  1    submit initiated
  8864.  2    submit executing
  8865.  3    internal client call/chat/spool/autospool
  8866.  4    in spool termination
  8867.  5    print permitted
  8868.  6    waiting for keyboard input
  8869.  
  8870. Bitfields for 10NET System Flags:
  8871. Bit(s)    Description    (Table 1036)
  8872.  0    in NetBIOS
  8873.  1    processing INT 28
  8874.  2    is server
  8875.  3    in net user-DOS function
  8876.  4    in DOS user-DOS function
  8877.  5    in net for user non-DOS function
  8878.  6    in server DOS function
  8879.  7    in server non-DOS function
  8880.  8    in terminate
  8881.  10    in user on server request
  8882.  13    in DOS for user on server
  8883.  14    disable critical error handler
  8884.  
  8885. Bitfields for Monitor Flags:
  8886. Bit(s)    Description    (Table 1037)
  8887.  0    waiting for monitor response
  8888.  4    in monitor get-input routine
  8889.  5    monitor display timeout
  8890.  6    sensing for escape key
  8891. --------D-215E02-----------------------------
  8892. INT 21 - DOS 3.1+ network - SET NETWORK PRINTER SETUP STRING
  8893.     AX = 5E02h
  8894.     BX = redirection list index (see AX=5F02h)
  8895.     CX = length of setup string
  8896.     DS:SI -> setup string
  8897. Return: CF clear if successful
  8898.     CF set on error
  8899.         AX = error code (01h) (see #1020 at AH=59h/BX=0000h)
  8900. Note:    also supported by 10NET v5.0
  8901. SeeAlso: AX=5E03h,INT 2F/AX=111Fh
  8902. --------D-215E03-----------------------------
  8903. INT 21 - DOS 3.1+ network - GET NETWORK PRINTER SETUP STRING
  8904.     AX = 5E03h
  8905.     BX = redirection list index (see AX=5F02h)
  8906.     ES:DI -> 64-byte buffer for setup string
  8907. Return: CF clear if successful
  8908.         CX = length of setup string
  8909.         ES:DI buffer filled
  8910.     CF set on error
  8911.         AX = error code (01h) (see #1020 at AH=59h/BX=0000h)
  8912. Note:    also supported by 10NET v5.0, but 10NET is documented as using DS:SI
  8913.       instead of ES:DI
  8914. SeeAlso: AX=5E02h,INT 2F/AX=111Fh
  8915. --------D-215E04-----------------------------
  8916. INT 21 - DOS 3.1+ network - SET PRINTER MODE
  8917.     AX = 5E04h
  8918.     BX = redirection list index (see AX=5F02h)
  8919.     DX = mode
  8920.         bit 0: set if binary, clear if text (tabs expanded to blanks)
  8921. Return: CF set on error
  8922.         AX = error code (see #1020 at AH=59h/BX=0000h)
  8923.     CF clear if successful
  8924. Note:    calls INT 2F/AX=111Fh with 5E04h on stack
  8925. SeeAlso: AX=5E05h"DOS",INT 2F/AX=111Fh
  8926. --------N-215E04-----------------------------
  8927. INT 21 - 10NET v5.0 - INITIATE PRINT JOB
  8928.     AX = 5E04h
  8929.     BX = zero-based redirection list index (see AX=5F02h)
  8930.     DS:DX -> extended workstation printer setup structure (see #1038)
  8931. Return: CF clear if successful
  8932.     CF set on error
  8933.         AX = error code (see #1020 at AH=59h/BX=0000h)
  8934. SeeAlso: AX=5E05h"10NET",AX=5E06h"10NET"
  8935.  
  8936. Format of 10NET extended workstation printer setup structure:
  8937. Offset    Size    Description    (Table 1038)
  8938.  00h    BYTE    notification flags (see #1039)
  8939.  01h    BYTE    job control mask (see #1040)
  8940.  02h    WORD    days to retain file
  8941.  04h    WORD    test print length
  8942.  06h    BYTE    number of copies to print
  8943.  07h    BYTE    compression algorithm
  8944.  08h    BYTE    tab width (00h = don't expand)
  8945.  09h    BYTE    initiation type (00h normal, 01h non-spooled)
  8946.  0Ah 38 BYTEs    job start operation notification instructions
  8947.  30h 32 BYTEs    comment for job
  8948.  50h 64 BYTEs    output filename or non-spooled file
  8949.  
  8950. Bitfields for 10NET notification flags:
  8951. Bit(s)    Description    (Table 1039)
  8952.  0    user at print start
  8953.  1    operator at start, with reply
  8954.  2    user at print completion
  8955.  3    operator at completion, with reply
  8956.  4    user on queue switch
  8957.  5    operator on queue switch, with reply
  8958.  6    user on print error
  8959.  
  8960. Bitfields for 10NET job control mask:
  8961. Bit(s)    Description    (Table 1040)
  8962.  0    print banner page
  8963.  1    eject page at end of job
  8964.  2    mark as "held" (queue but don't print)
  8965.  3    rush job (queue at top)
  8966.  4    overwrite file with zeros before deletion
  8967.  5    hyperspool if possible
  8968. --------D-215E05-----------------------------
  8969. INT 21 - DOS 3.1+ network - GET PRINTER MODE
  8970.     AX = 5E05h
  8971.     BX = redirection list index (see AX=5F02h)
  8972. Return: CF set on error
  8973.         AX = error code (see #1020 at AH=59h/BX=0000h)
  8974.     CF clear if successful
  8975.         DX = printer mode (see AX=5E04h)
  8976. Note:    calls INT 2F/AX=111Fh with 5E05h on stack
  8977. SeeAlso: AX=5E04h"DOS",INT 2F/AX=111Fh
  8978. --------N-215E05-----------------------------
  8979. INT 21 - 10NET v5.0 - TERMINATE PRINT JOB
  8980.     AX = 5E05h
  8981.     BX = zero-based redirection list index (see AX=5F02h)
  8982. Return: CF clear if successful
  8983.     CF set on error
  8984.         AX = error code (see #1020 at AH=59h/BX=0000h)
  8985. Note:    this call resets the spool termination mode to "truncate"
  8986.       (see AX=5D08h)
  8987. SeeAlso: AX=5E04h"10NET",AX=5E06h
  8988. --------N-215E06-----------------------------
  8989. INT 21 - 10NET v5.0 - GET/SET 10NET WORKSTATION PRINTER SETUP STRUCTURE
  8990.     AX = 5E06h
  8991.     BX = zero-based redirection list index (see AX=5F02h)
  8992.     CX = operation (06h set, 07h get)
  8993.     DS:DX -> buffer for setup structure (same as first nine bytes of
  8994.           workstation printer setup) (see #1038)
  8995. Return: CF clear if successful
  8996.         DS:DX buffer updated on get
  8997.     CF set on error
  8998.         AX = error code (see #1020 at AH=59h/BX=0000h)
  8999. SeeAlso: AX=5E04h"10NET",AX=5E05h"10NET"
  9000. --------!---Section--------------------------
  9001.